public class RandomAccessFile extends Object implements DataOutput, DataInput
Constructor and Description |
---|
RandomAccessFile(File file,
String s) |
RandomAccessFile(String s,
String s1) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
FileDescriptor |
getFD() |
long |
getFilePointer() |
long |
length() |
int |
read() |
int |
read(byte[] abyte0) |
int |
read(byte[] abyte0,
int i,
int j) |
boolean |
readBoolean() |
byte |
readByte() |
char |
readChar() |
double |
readDouble() |
float |
readFloat() |
void |
readFully(byte[] abyte0) |
void |
readFully(byte[] abyte0,
int i,
int j) |
int |
readInt() |
String |
readLine() |
long |
readLong() |
short |
readShort() |
int |
readUnsignedByte() |
int |
readUnsignedShort() |
String |
readUTF() |
void |
seek(long l) |
void |
setLength(long newLength) |
int |
skipBytes(int i) |
void |
write(byte[] abyte0) |
void |
write(byte[] abyte0,
int i,
int j) |
void |
write(int i) |
void |
writeBoolean(boolean flag) |
void |
writeByte(int i) |
void |
writeBytes(String s) |
void |
writeChar(int i) |
void |
writeChars(String s) |
void |
writeDouble(double d) |
void |
writeFloat(float f) |
void |
writeInt(int i) |
void |
writeLong(long l) |
void |
writeShort(int i) |
void |
writeUTF(String s) |
public RandomAccessFile(File file, String s) throws IOException
file
- ?s
- ?IOException
- ?public RandomAccessFile(String s, String s1) throws IOException
s
- ?s1
- ?IOException
- ?public void close() throws IOException
IOException
- ?public final FileDescriptor getFD() throws IOException
IOException
- ?public long getFilePointer() throws IOException
IOException
- ?public long length() throws IOException
IOException
- ?public int read() throws IOException
IOException
- ?public int read(byte[] abyte0) throws IOException
abyte0
- ?IOException
- ?public int read(byte[] abyte0, int i, int j) throws IOException
abyte0
- ?i
- ?j
- ?IOException
- ?public final boolean readBoolean() throws IOException
readBoolean
in interface DataInput
IOException
- ?public final byte readByte() throws IOException
readByte
in interface DataInput
IOException
- ?public final char readChar() throws IOException
readChar
in interface DataInput
IOException
- ?public final double readDouble() throws IOException
readDouble
in interface DataInput
IOException
- ?public final float readFloat() throws IOException
readFloat
in interface DataInput
IOException
- ?public final void readFully(byte[] abyte0) throws IOException
readFully
in interface DataInput
abyte0
- ?IOException
- ?public final void readFully(byte[] abyte0, int i, int j) throws IOException
readFully
in interface DataInput
abyte0
- ?i
- ?j
- ?IOException
- ?public final int readInt() throws IOException
readInt
in interface DataInput
IOException
- ?public final String readLine() throws IOException
readLine
in interface DataInput
IOException
- ?public final long readLong() throws IOException
readLong
in interface DataInput
IOException
- ?public final short readShort() throws IOException
readShort
in interface DataInput
IOException
- ?public final String readUTF() throws IOException
readUTF
in interface DataInput
IOException
- ?public final int readUnsignedByte() throws IOException
readUnsignedByte
in interface DataInput
IOException
- ?public final int readUnsignedShort() throws IOException
readUnsignedShort
in interface DataInput
IOException
- ?public void seek(long l) throws IOException
l
- ?IOException
- ?public void setLength(long newLength) throws IOException
newLength
- ?IOException
- ?public int skipBytes(int i) throws IOException
skipBytes
in interface DataInput
i
- ?IOException
- ?public void write(int i) throws IOException
write
in interface DataOutput
i
- ?IOException
- ?public void write(byte[] abyte0) throws IOException
write
in interface DataOutput
abyte0
- ?IOException
- ?public void write(byte[] abyte0, int i, int j) throws IOException
write
in interface DataOutput
abyte0
- ?i
- ?j
- ?IOException
- ?public final void writeBoolean(boolean flag) throws IOException
writeBoolean
in interface DataOutput
flag
- ?IOException
- ?public final void writeByte(int i) throws IOException
writeByte
in interface DataOutput
i
- ?IOException
- ?public final void writeBytes(String s) throws IOException
writeBytes
in interface DataOutput
s
- ?IOException
- ?public final void writeChar(int i) throws IOException
writeChar
in interface DataOutput
i
- ?IOException
- ?public final void writeChars(String s) throws IOException
writeChars
in interface DataOutput
s
- ?IOException
- ?public final void writeDouble(double d) throws IOException
writeDouble
in interface DataOutput
d
- ?IOException
- ?public final void writeFloat(float f) throws IOException
writeFloat
in interface DataOutput
f
- ?IOException
- ?public final void writeInt(int i) throws IOException
writeInt
in interface DataOutput
i
- ?IOException
- ?public final void writeLong(long l) throws IOException
writeLong
in interface DataOutput
l
- ?IOException
- ?public final void writeShort(int i) throws IOException
writeShort
in interface DataOutput
i
- ?IOException
- ?public final void writeUTF(String s) throws IOException
writeUTF
in interface DataOutput
s
- ?IOException
- ?