Package org.ujmp.core.util.io
Class BufferedRandomAccessFile
java.lang.Object
java.io.RandomAccessFile
org.ujmp.core.util.io.BufferedRandomAccessFile
- All Implemented Interfaces:
Closeable
,DataInput
,DataOutput
,AutoCloseable
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBufferedRandomAccessFile
(File file, String mode) BufferedRandomAccessFile
(File file, String mode, int bufferSize) -
Method Summary
Modifier and TypeMethodDescriptionint
read()
int
read
(byte[] b) int
read
(long seek, byte[] b) void
seek
(long pos) void
write
(long seek, byte[] array) void
writeByte
(long seek, byte value) void
writeChar
(long seek, char value) void
writeDouble
(long seek, double value) void
writeFloat
(long seek, float value) void
writeInt
(long seek, int value) void
writeLong
(long seek, long value) void
writeShort
(long seek, short value) Methods inherited from class java.io.RandomAccessFile
close, getChannel, getFD, getFilePointer, 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
-
Field Details
-
bufferSize
private int bufferSize -
buffer
-
-
Constructor Details
-
BufferedRandomAccessFile
- Throws:
FileNotFoundException
-
BufferedRandomAccessFile
public BufferedRandomAccessFile(File file, String mode, int bufferSize) throws FileNotFoundException - Throws:
FileNotFoundException
-
-
Method Details
-
read
- Overrides:
read
in classRandomAccessFile
- Throws:
IOException
-
seek
- Overrides:
seek
in classRandomAccessFile
- Throws:
IOException
-
read
- Overrides:
read
in classRandomAccessFile
- Throws:
IOException
-
read
- Throws:
IOException
-
writeByte
- Throws:
IOException
-
writeChar
- Throws:
IOException
-
writeDouble
- Throws:
IOException
-
writeFloat
- Throws:
IOException
-
writeShort
- Throws:
IOException
-
write
- Throws:
IOException
-
writeInt
- Throws:
IOException
-
writeLong
- Throws:
IOException
-