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.Object
FileChannel
content buffer.
-
-
Field Summary
Fields Modifier and Type Field Description long
bytesWritten
Bytes written.FileCompleteCallback
callback
OptionalFileCompleteCallback
.long
count
Count of bytes after the position to write from theFileChannel
.java.nio.channels.FileChannel
file
FileChannel
.long
position
Position within theFileChannel
to 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 entireFileChannel
content.
-
-
-
Field Detail
-
file
public final java.nio.channels.FileChannel file
FileChannel
.
-
position
public final long position
Position within theFileChannel
to 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 entireFileChannel
content.- Parameters:
file
-FileChannel
.callback
- OptionalFileCompleteCallback
. May benull
.
-
-