Class BufferedStreamInput

  • All Implemented Interfaces:
    java.io.Closeable, java.io.DataInput, java.lang.AutoCloseable, org.apache.hugegraph.computer.core.io.BytesInput, org.apache.hugegraph.computer.core.io.RandomAccessInput

    public class BufferedStreamInput
    extends UnsafeBytesInput
    • Constructor Detail

      • BufferedStreamInput

        public BufferedStreamInput​(java.io.InputStream input)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • BufferedStreamInput

        public BufferedStreamInput​(java.io.InputStream input,
                                   int bufferCapacity)
                            throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • position

        public long position()
        Specified by:
        position in interface org.apache.hugegraph.computer.core.io.RandomAccessInput
        Overrides:
        position in class UnsafeBytesInput
      • readFully

        public void readFully​(byte[] b)
                       throws java.io.IOException
        Specified by:
        readFully in interface java.io.DataInput
        Overrides:
        readFully in class UnsafeBytesInput
        Throws:
        java.io.IOException
      • readFully

        public void readFully​(byte[] b,
                              int off,
                              int len)
                       throws java.io.IOException
        Specified by:
        readFully in interface java.io.DataInput
        Overrides:
        readFully in class UnsafeBytesInput
        Throws:
        java.io.IOException
      • seek

        public void seek​(long position)
                  throws java.io.IOException
        Specified by:
        seek in interface org.apache.hugegraph.computer.core.io.RandomAccessInput
        Overrides:
        seek in class UnsafeBytesInput
        Throws:
        java.io.IOException
      • skip

        public long skip​(long bytesToSkip)
                  throws java.io.IOException
        Specified by:
        skip in interface org.apache.hugegraph.computer.core.io.RandomAccessInput
        Overrides:
        skip in class UnsafeBytesInput
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class UnsafeBytesInput
        Throws:
        java.io.IOException
      • require

        protected void require​(int size)
                        throws java.io.IOException
        Overrides:
        require in class UnsafeBytesInput
        Throws:
        java.io.IOException
      • available

        public long available()
                       throws java.io.IOException
        The stream has no limit.
        Specified by:
        available in interface org.apache.hugegraph.computer.core.io.RandomAccessInput
        Overrides:
        available in class UnsafeBytesInput
        Throws:
        java.io.IOException