Package net.officefloor.server.stream
Class StreamBuffer.FileBuffer
- java.lang.Object
-
- net.officefloor.server.stream.StreamBuffer.FileBuffer
-
- Enclosing class:
- StreamBuffer<B>
public static class StreamBuffer.FileBuffer extends java.lang.ObjectFileChannelcontent buffer.
-
-
Field Summary
Fields Modifier and Type Field Description longbytesWrittenBytes written.FileCompleteCallbackcallbackOptionalFileCompleteCallback.longcountCount of bytes after the position to write from theFileChannel.java.nio.channels.FileChannelfileFileChannel.longpositionPosition within theFileChannelto write content.
-
Constructor Summary
Constructors Constructor Description FileBuffer(java.nio.channels.FileChannel file, long position, long count, FileCompleteCallback callback)Instantiate.FileBuffer(java.nio.channels.FileChannel file, FileCompleteCallback callback)Instantiate to write the entireFileChannelcontent.
-
-
-
Field Detail
-
file
public final java.nio.channels.FileChannel file
FileChannel.
-
position
public final long position
Position within theFileChannelto write content.
-
count
public final long count
Count of bytes after the position to write from theFileChannel. Negative number (eg-1) will write remaining content ofFileChannel.
-
callback
public final FileCompleteCallback callback
OptionalFileCompleteCallback. May benull.
-
bytesWritten
public long bytesWritten
Bytes written. This is used by server implementations to track the number of bytes written from theFileChannel.
-
-
Constructor Detail
-
FileBuffer
public FileBuffer(java.nio.channels.FileChannel file, long position, long count, FileCompleteCallback callback)Instantiate.- Parameters:
file-FileChannel.position- Position.count- Count.callback- OptionalFileCompleteCallback. May benull.
-
FileBuffer
public FileBuffer(java.nio.channels.FileChannel file, FileCompleteCallback callback)Instantiate to write the entireFileChannelcontent.- Parameters:
file-FileChannel.callback- OptionalFileCompleteCallback. May benull.
-
-