Class StreamBuffer.FileBuffer

  • Enclosing class:
    StreamBuffer<B>

    public static class StreamBuffer.FileBuffer
    extends java.lang.Object
    FileChannel content buffer.
    • 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 entire FileChannel content.
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • file

        public final java.nio.channels.FileChannel file
        FileChannel.
      • position

        public final long position
        Position within the FileChannel to write content.
      • count

        public final long count
        Count of bytes after the position to write from the FileChannel. Negative number (eg -1) will write remaining content of FileChannel.
      • bytesWritten

        public long bytesWritten
        Bytes written. This is used by server implementations to track the number of bytes written from the FileChannel.
    • 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 - Optional FileCompleteCallback. May be null.
      • FileBuffer

        public FileBuffer​(java.nio.channels.FileChannel file,
                          FileCompleteCallback callback)
        Instantiate to write the entire FileChannel content.
        Parameters:
        file - FileChannel.
        callback - Optional FileCompleteCallback. May be null.