Class FileData
java.lang.Object
org.jvnet.mimepull.FileData
- All Implemented Interfaces:
Data
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateNext(DataHead dataHead, ByteBuffer buf) Factory method to create a Data.byte[]read()TODO: should the return type be ByteBuffer ?? Return part's partial data.intsize()size of the chunk given by the parserlongWrite this partial data to a file
-
Field Details
-
file
-
pointer
private final long pointer -
length
private final int length
-
-
Constructor Details
-
FileData
FileData(DataFile file, ByteBuffer buf) -
FileData
FileData(DataFile file, long pointer, int length)
-
-
Method Details
-
read
public byte[] read()Description copied from interface:DataTODO: should the return type be ByteBuffer ?? Return part's partial data. The data is read only. -
writeTo
-
size
-
createNext
Description copied from interface:DataFactory method to create a Data. The implementation could be file based one or memory based one.- Specified by:
createNextin interfaceData- Parameters:
dataHead- start of the linked list of data objectsbuf- contains partial content for a part- Returns:
- Data
-