Package org.apache.zookeeper.graph
Class RandomAccessFileReader
java.lang.Object
java.io.Reader
org.apache.zookeeper.graph.RandomAccessFileReader
- All Implemented Interfaces:
Closeable
,DataInput
,AutoCloseable
,Readable
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
long
Seek interfacestatic void
boolean
Reader interfaceint
read
(byte[] buf, int off, int len) int
read
(char[] cbuf, int off, int len) copy what we can from buffer.boolean
byte
readByte()
char
readChar()
double
float
void
readFully
(byte[] b) DataInput interfacevoid
readFully
(byte[] b, int off, int len) int
readInt()
readLine()
works like the usual readLine but disregards \r to make things easierlong
readLong()
short
int
int
readUTF()
void
seek
(long pos) int
skipBytes
(int n) Methods inherited from class java.io.Reader
mark, nullReader, read, read, read, ready, reset, skip, transferTo
-
Constructor Details
-
RandomAccessFileReader
- Throws:
FileNotFoundException
-
-
Method Details
-
markSupported
public boolean markSupported()Reader interface- Overrides:
markSupported
in classReader
-
read
copy what we can from buffer. if it's not enough, fill buffer again and copy again- Specified by:
read
in classReader
- Throws:
IOException
-
read
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in 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:
readLine
in interfaceDataInput
- Throws:
IOException
-
readFully
DataInput interface- Specified by:
readFully
in interfaceDataInput
- Throws:
IOException
-
readFully
- Specified by:
readFully
in interfaceDataInput
- Throws:
IOException
-
skipBytes
- Specified by:
skipBytes
in interfaceDataInput
- Throws:
IOException
-
readBoolean
- Specified by:
readBoolean
in interfaceDataInput
- Throws:
IOException
-
readByte
- Specified by:
readByte
in interfaceDataInput
- Throws:
IOException
-
readUnsignedByte
- Specified by:
readUnsignedByte
in interfaceDataInput
- Throws:
IOException
-
readShort
- Specified by:
readShort
in interfaceDataInput
- Throws:
IOException
-
readUnsignedShort
- Specified by:
readUnsignedShort
in interfaceDataInput
- Throws:
IOException
-
readChar
- Specified by:
readChar
in interfaceDataInput
- Throws:
IOException
-
readInt
- Specified by:
readInt
in interfaceDataInput
- Throws:
IOException
-
readLong
- Specified by:
readLong
in interfaceDataInput
- Throws:
IOException
-
readFloat
- Specified by:
readFloat
in interfaceDataInput
- Throws:
IOException
-
readDouble
- Specified by:
readDouble
in interfaceDataInput
- Throws:
IOException
-
readUTF
- Specified by:
readUTF
in interfaceDataInput
- Throws:
IOException
-
main
- Throws:
IOException
-