Class RandomAccessFileReader
java.lang.Object
java.io.Reader
org.apache.zookeeper.graph.RandomAccessFileReader
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()longSeek interfacestatic voidbooleanReader interfaceintread(byte[] buf, int off, int len) intread(char[] cbuf, int off, int len) copy what we can from buffer.booleanbytereadByte()charreadChar()doublefloatvoidreadFully(byte[] b) DataInput interfacevoidreadFully(byte[] b, int off, int len) intreadInt()readLine()works like the usual readLine but disregards \r to make things easierlongreadLong()shortintintreadUTF()voidseek(long pos) intskipBytes(int n)
-
Constructor Details
-
RandomAccessFileReader
- Throws:
FileNotFoundException
-
-
Method Details
-
markSupported
-
read
copy what we can from buffer. if it's not enough, fill buffer again and copy again- Specified by:
readin classReader- Throws:
IOException
-
read
- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classReader- Throws:
IOException
-
getPosition
public long getPosition()Seek interface -
seek
- Throws:
IOException
-
readLine
works like the usual readLine but disregards \r to make things easier- Specified by:
readLinein interfaceDataInput- Throws:
IOException
-
readFully
DataInput interface- Specified by:
readFullyin interfaceDataInput- Throws:
IOException
-
readFully
- Specified by:
readFullyin interfaceDataInput- Throws:
IOException
-
skipBytes
- Specified by:
skipBytesin interfaceDataInput- Throws:
IOException
-
readBoolean
- Specified by:
readBooleanin interfaceDataInput- Throws:
IOException
-
readByte
- Specified by:
readBytein interfaceDataInput- Throws:
IOException
-
readUnsignedByte
- Specified by:
readUnsignedBytein interfaceDataInput- Throws:
IOException
-
readShort
- Specified by:
readShortin interfaceDataInput- Throws:
IOException
-
readUnsignedShort
- Specified by:
readUnsignedShortin interfaceDataInput- Throws:
IOException
-
readChar
- Specified by:
readCharin interfaceDataInput- Throws:
IOException
-
readInt
- Specified by:
readIntin interfaceDataInput- Throws:
IOException
-
readLong
- Specified by:
readLongin interfaceDataInput- Throws:
IOException
-
readFloat
- Specified by:
readFloatin interfaceDataInput- Throws:
IOException
-
readDouble
- Specified by:
readDoublein interfaceDataInput- Throws:
IOException
-
readUTF
- Specified by:
readUTFin interfaceDataInput- Throws:
IOException
-
main
- Throws:
IOException
-