Package net.officefloor.server.stream
Class StreamBuffer.FileBuffer
java.lang.Object
net.officefloor.server.stream.StreamBuffer.FileBuffer
- Enclosing class:
- StreamBuffer<B>
FileChannel content buffer.-
Field Summary
FieldsModifier and TypeFieldDescriptionlongBytes written.final FileCompleteCallbackOptionalFileCompleteCallback.final longCount of bytes after the position to write from theFileChannel.final FileChannelfinal longPosition within theFileChannelto write content. -
Constructor Summary
ConstructorsConstructorDescriptionFileBuffer(FileChannel file, long position, long count, FileCompleteCallback callback) Instantiate.FileBuffer(FileChannel file, FileCompleteCallback callback) Instantiate to write the entireFileChannelcontent. -
Method Summary
-
Field Details
-
file
-
position
public final long positionPosition within theFileChannelto write content. -
count
public final long countCount of bytes after the position to write from theFileChannel. Negative number (eg-1) will write remaining content ofFileChannel. -
callback
OptionalFileCompleteCallback. May benull. -
bytesWritten
public long bytesWrittenBytes written. This is used by server implementations to track the number of bytes written from theFileChannel.
-
-
Constructor Details
-
FileBuffer
Instantiate.- Parameters:
file-FileChannel.position- Position.count- Count.callback- OptionalFileCompleteCallback. May benull.
-
FileBuffer
Instantiate to write the entireFileChannelcontent.- Parameters:
file-FileChannel.callback- OptionalFileCompleteCallback. May benull.
-