Class ThreadLocalReadAheadBuffer


  • public final class ThreadLocalReadAheadBuffer
    extends java.lang.Object
    • Constructor Detail

      • ThreadLocalReadAheadBuffer

        public ThreadLocalReadAheadBuffer​(ChannelProxy channel,
                                          int bufferSize,
                                          BufferType bufferType)
    • Method Detail

      • hasBuffer

        public boolean hasBuffer()
      • remaining

        public int remaining()
        Safe to call only if hasBuffer() is true
      • allocateBuffer

        public void allocateBuffer()
      • fill

        public void fill​(long position)
      • read

        public int read​(java.nio.ByteBuffer dest,
                        int length)
      • clear

        public void clear​(boolean deallocate)
      • close

        public void close()