public final class FilePartitionerUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static int |
getChunkSize() |
static int |
getFileSize(File file) |
static int |
getNumberOfChunks(File file)
Returns the number of chunks for a given file.
|
static FileChunk |
readChunk(File file,
FileTransferInformation fileInformation)
Reads a file chunk from a file.
|
static void |
writeChunk(File file,
FileChunk fileChunk)
Writes a file chunk to a file.
|
public static void writeChunk(File file, FileChunk fileChunk) throws FileTransferException
file - file to be written tofileChunk - file chunkFileTransferException - if any error occurs writing to the file.public static FileChunk readChunk(File file, FileTransferInformation fileInformation) throws FileTransferException
file - to be read fromfileInformation - containing file transfer attributesFileTransferException - if any error occurs reading the filepublic static int getNumberOfChunks(File file) throws FileTransferException
file - fileFileTransferException - if any error occurs obtaining the file handle.public static int getFileSize(File file) throws FileTransferException
file - fileFileTransferException - if any error occurs reading file sizepublic static int getChunkSize()
Copyright © 2017. All rights reserved.