Class BufferedChannelReader


  • public class BufferedChannelReader
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      BufferedChannelReader​(java.lang.String filename, int blockSize, int readSize)
      Guarantees that each buffer from readNext() will have remaining() >= blockSize [that is, until it starts winding down on the end of the file] When it needs to refresh, it will read <= readSize from the channel
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      java.nio.ByteBuffer getBb()  
      int getRead()  
      java.nio.ByteBuffer readNext()  
      • Methods inherited from class java.lang.Object

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

      • BufferedChannelReader

        public BufferedChannelReader​(java.lang.String filename,
                                     int blockSize,
                                     int readSize)
        Guarantees that each buffer from readNext() will have remaining() >= blockSize [that is, until it starts winding down on the end of the file] When it needs to refresh, it will read <= readSize from the channel
    • Method Detail

      • readNext

        public java.nio.ByteBuffer readNext()
                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • getBb

        public java.nio.ByteBuffer getBb()
      • getRead

        public int getRead()
      • close

        public void close()
                   throws java.io.IOException
        Throws:
        java.io.IOException