Class AbstractBufferedFileInput
- java.lang.Object
-
- org.apache.hugegraph.computer.core.io.UnsafeBytesInput
-
- org.apache.hugegraph.computer.core.io.AbstractBufferedFileInput
-
- 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
- Direct Known Subclasses:
BufferedFileInput,ValueFileInput
public abstract class AbstractBufferedFileInput extends UnsafeBytesInput
-
-
Field Summary
Fields Modifier and Type Field Description protected longfileOffset
-
Constructor Summary
Constructors Constructor Description AbstractBufferedFileInput(int bufferCapacity, long fileLength)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description longavailable()protected intbufferCapacity()intcompare(long offset, long length, org.apache.hugegraph.computer.core.io.RandomAccessInput other, long otherOffset, long otherLength)protected longfileLength()protected abstract voidfillBuffer()longposition()voidreadFully(byte[] b)protected voidrequire(int size)protected voidshiftAndFillBuffer()longskip(long bytesToSkip)-
Methods inherited from class org.apache.hugegraph.computer.core.io.UnsafeBytesInput
buffer, close, duplicate, limit, limit, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, remaining, seek, 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
-
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
-
require
protected void require(int size) throws java.io.IOException- Overrides:
requirein classUnsafeBytesInput- Throws:
java.io.IOException
-
available
public long available() throws java.io.IOException- Specified by:
availablein interfaceorg.apache.hugegraph.computer.core.io.RandomAccessInput- Overrides:
availablein classUnsafeBytesInput- Throws:
java.io.IOException
-
shiftAndFillBuffer
protected void shiftAndFillBuffer() throws java.io.IOException- Throws:
java.io.IOException
-
fillBuffer
protected abstract void fillBuffer() throws java.io.IOException- Throws:
java.io.IOException
-
compare
public int compare(long offset, long length, org.apache.hugegraph.computer.core.io.RandomAccessInput other, long otherOffset, long otherLength) throws java.io.IOException- Specified by:
comparein interfaceorg.apache.hugegraph.computer.core.io.RandomAccessInput- Overrides:
comparein classUnsafeBytesInput- Throws:
java.io.IOException
-
bufferCapacity
protected int bufferCapacity()
-
fileLength
protected long fileLength()
-
-