Class BufferedStreamInput
- java.lang.Object
-
- org.apache.hugegraph.computer.core.io.UnsafeBytesInput
-
- org.apache.hugegraph.computer.core.io.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 Summary
Constructors Constructor Description BufferedStreamInput(java.io.InputStream input)BufferedStreamInput(java.io.InputStream input, int bufferCapacity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longavailable()The stream has no limit.voidclose()longposition()voidreadFully(byte[] b)voidreadFully(byte[] b, int off, int len)protected voidrequire(int size)voidseek(long position)longskip(long bytesToSkip)-
Methods inherited from class org.apache.hugegraph.computer.core.io.UnsafeBytesInput
buffer, compare, duplicate, limit, limit, readBoolean, readByte, readChar, readDouble, readFloat, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, remaining, shiftBuffer, skipBytes
-
-
-
-
Method Detail
-
position
public long position()
- Specified by:
positionin interfaceorg.apache.hugegraph.computer.core.io.RandomAccessInput- Overrides:
positionin classUnsafeBytesInput
-
readFully
public void readFully(byte[] b) throws java.io.IOException- Specified by:
readFullyin interfacejava.io.DataInput- Overrides:
readFullyin classUnsafeBytesInput- Throws:
java.io.IOException
-
readFully
public void readFully(byte[] b, int off, int len) throws java.io.IOException- Specified by:
readFullyin interfacejava.io.DataInput- Overrides:
readFullyin classUnsafeBytesInput- Throws:
java.io.IOException
-
seek
public void seek(long position) throws java.io.IOException- Specified by:
seekin interfaceorg.apache.hugegraph.computer.core.io.RandomAccessInput- Overrides:
seekin classUnsafeBytesInput- Throws:
java.io.IOException
-
skip
public long skip(long bytesToSkip) throws java.io.IOException- Specified by:
skipin interfaceorg.apache.hugegraph.computer.core.io.RandomAccessInput- Overrides:
skipin classUnsafeBytesInput- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classUnsafeBytesInput- Throws:
java.io.IOException
-
require
protected void require(int size) throws java.io.IOException- Overrides:
requirein classUnsafeBytesInput- Throws:
java.io.IOException
-
available
public long available() throws java.io.IOExceptionThe stream has no limit.- Specified by:
availablein interfaceorg.apache.hugegraph.computer.core.io.RandomAccessInput- Overrides:
availablein classUnsafeBytesInput- Throws:
java.io.IOException
-
-