- java.lang.Object
-
- java.io.RandomAccessFile
-
- util.io.BufferedRandomAccessFile
-
- All Implemented Interfaces:
java.io.Closeable
,java.io.DataInput
,java.io.DataOutput
,java.lang.AutoCloseable
public class BufferedRandomAccessFile extends java.io.RandomAccessFile
buffered RandomAccessFile for faster reading- Author:
- mikepple
-
-
Constructor Summary
Constructors Constructor Description BufferedRandomAccessFile(java.io.File file, java.lang.String mode)
BufferedRandomAccessFile(java.lang.String filename, java.lang.String mode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getFilePointer()
int
read()
int
read(byte[] b, int off, int len)
void
seek(long pos)
-
Methods inherited from class java.io.RandomAccessFile
close, getChannel, getFD, length, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, setLength, skipBytes, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
-
-
-
-
Constructor Detail
-
BufferedRandomAccessFile
public BufferedRandomAccessFile(java.io.File file, java.lang.String mode) throws java.io.IOException
- Throws:
java.io.IOException
-
BufferedRandomAccessFile
public BufferedRandomAccessFile(java.lang.String filename, java.lang.String mode) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
read
public final int read() throws java.io.IOException
- Overrides:
read
in classjava.io.RandomAccessFile
- Throws:
java.io.IOException
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException
- Overrides:
read
in classjava.io.RandomAccessFile
- Throws:
java.io.IOException
-
getFilePointer
public long getFilePointer() throws java.io.IOException
- Overrides:
getFilePointer
in classjava.io.RandomAccessFile
- Throws:
java.io.IOException
-
seek
public void seek(long pos) throws java.io.IOException
- Overrides:
seek
in classjava.io.RandomAccessFile
- Throws:
java.io.IOException
-
-