Public Member Functions | |
FileBlock () | |
Empty ProActive constructor. | |
FileBlock (long offset) | |
FileBlock (long offset, int blockSize) | |
void | loadNextBlock (BufferedInputStream bis) throws IOException |
Loads the FileBlock object with a block from the source file this block references. | |
void | saveCurrentBlock (BufferedOutputStream bos) throws IOException |
Saves the current block into an output stream buffer. | |
long | getOffset () |
| |
int | getBlockSize () |
| |
Exception | getException () |
boolean | hasException () |
void | setException (Exception e) |
Static Public Attributes | |
static final int | DEFAULT_BLOCK_SIZE = 256 * 1024 |
Static Protected Attributes | |
static Logger | logger = ProActiveLogger.getLogger(Loggers.FILETRANSFER) |
It is used to load file blocks from a file, to send them through the network, and later to store the file block on the remote machines.
Definition at line 78 of file FileBlock.java.
void org.objectweb.proactive.core.filetransfer.FileBlock.loadNextBlock | ( | BufferedInputStream | bis | ) | throws IOException |
Loads the FileBlock object with a block from the source file this block references.
If the parameter is null, then it will create a new buffer from the parameters stored in the block instance. Note that creating a new block requires performing a skip (seek) on the stream, which is very slow. Therefore it is better to pass the buffered stream as parameter.
Definition at line 112 of file FileBlock.java.
Referenced by org.objectweb.proactive.core.filetransfer.FileTransferService.getFileBlock(), and org.objectweb.proactive.core.filetransfer.FileTransferService.sendFile().
void org.objectweb.proactive.core.filetransfer.FileBlock.saveCurrentBlock | ( | BufferedOutputStream | bos | ) | throws IOException |
Saves the current block into an output stream buffer.
bos | The BufferedOutputStream to save the file |
IOException | If an error is encountered. |
Definition at line 133 of file FileBlock.java.
Referenced by org.objectweb.proactive.core.filetransfer.FileTransferService.saveFileBlockAndForwardWithoutThrowingException(), and org.objectweb.proactive.core.filetransfer.FileTransferService.saveFileBlockWithoutThrowingException().