| Constructor and Description |
|---|
RandomAccessFileReader(File f) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
long |
getPosition()
Seek interface
|
static void |
main(String[] args) |
boolean |
markSupported()
Reader interface
|
int |
read(byte[] buf,
int off,
int len) |
int |
read(char[] cbuf,
int off,
int len)
copy what we can from buffer.
|
boolean |
readBoolean() |
byte |
readByte() |
char |
readChar() |
double |
readDouble() |
float |
readFloat() |
void |
readFully(byte[] b)
DataInput interface
|
void |
readFully(byte[] b,
int off,
int len) |
int |
readInt() |
String |
readLine()
works like the usual readLine but disregards \r to make things easier
|
long |
readLong() |
short |
readShort() |
int |
readUnsignedByte() |
int |
readUnsignedShort() |
String |
readUTF() |
void |
seek(long pos) |
int |
skipBytes(int n) |
public RandomAccessFileReader(File f) throws FileNotFoundException
FileNotFoundExceptionpublic boolean markSupported()
markSupported in class Readerpublic int read(char[] cbuf,
int off,
int len)
throws IOException
read in class ReaderIOExceptionpublic int read(byte[] buf,
int off,
int len)
throws IOException
IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class ReaderIOExceptionpublic long getPosition()
public void seek(long pos)
throws IOException
IOExceptionpublic String readLine() throws IOException
readLine in interface DataInputIOExceptionpublic void readFully(byte[] b)
throws IOException
readFully in interface DataInputIOExceptionpublic void readFully(byte[] b,
int off,
int len)
throws IOException
readFully in interface DataInputIOExceptionpublic int skipBytes(int n)
throws IOException
skipBytes in interface DataInputIOExceptionpublic boolean readBoolean()
throws IOException
readBoolean in interface DataInputIOExceptionpublic byte readByte()
throws IOException
readByte in interface DataInputIOExceptionpublic int readUnsignedByte()
throws IOException
readUnsignedByte in interface DataInputIOExceptionpublic short readShort()
throws IOException
readShort in interface DataInputIOExceptionpublic int readUnsignedShort()
throws IOException
readUnsignedShort in interface DataInputIOExceptionpublic char readChar()
throws IOException
readChar in interface DataInputIOExceptionpublic int readInt()
throws IOException
readInt in interface DataInputIOExceptionpublic long readLong()
throws IOException
readLong in interface DataInputIOExceptionpublic float readFloat()
throws IOException
readFloat in interface DataInputIOExceptionpublic double readDouble()
throws IOException
readDouble in interface DataInputIOExceptionpublic String readUTF() throws IOException
readUTF in interface DataInputIOExceptionpublic static void main(String[] args) throws IOException
IOExceptionCopyright © 2008–2021 The Apache Software Foundation. All rights reserved.