Package java.io
Class RandomAccessFile
- java.lang.Object
-
- java.io.RandomAccessFile
-
- All Implemented Interfaces:
DataInput
,DataOutput
public class RandomAccessFile extends Object implements DataInput, DataOutput
-
-
Constructor Summary
Constructors Constructor Description RandomAccessFile(File var0, String var1)
RandomAccessFile(String var0, String var1)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
FileDescriptor
getFD()
long
getFilePointer()
long
length()
int
read()
int
read(byte[] var0)
int
read(byte[] var0, int var1, int var2)
boolean
readBoolean()
byte
readByte()
char
readChar()
double
readDouble()
float
readFloat()
void
readFully(byte[] var0)
void
readFully(byte[] var0, int var1, int var2)
int
readInt()
String
readLine()
long
readLong()
short
readShort()
int
readUnsignedByte()
int
readUnsignedShort()
String
readUTF()
void
seek(long var0)
void
setLength(long var0)
int
skipBytes(int var0)
void
write(byte[] var0)
void
write(byte[] var0, int var1, int var2)
void
write(int var0)
void
writeBoolean(boolean var0)
void
writeByte(int var0)
void
writeBytes(String var0)
void
writeChar(int var0)
void
writeChars(String var0)
void
writeDouble(double var0)
void
writeFloat(float var0)
void
writeInt(int var0)
void
writeLong(long var0)
void
writeShort(int var0)
void
writeUTF(String var0)
-
-
-
Constructor Detail
-
RandomAccessFile
public RandomAccessFile(File var0, String var1) throws FileNotFoundException
- Throws:
FileNotFoundException
-
RandomAccessFile
public RandomAccessFile(String var0, String var1) throws FileNotFoundException
- Throws:
FileNotFoundException
-
-
Method Detail
-
close
public void close() throws IOException
- Throws:
IOException
-
getFD
public final FileDescriptor getFD() throws IOException
- Throws:
IOException
-
getFilePointer
public long getFilePointer() throws IOException
- Throws:
IOException
-
length
public long length() throws IOException
- Throws:
IOException
-
read
public int read() throws IOException
- Throws:
IOException
-
read
public int read(byte[] var0) throws IOException
- Throws:
IOException
-
read
public int read(byte[] var0, int var1, int var2) throws IOException
- Throws:
IOException
-
readBoolean
public final boolean readBoolean() throws IOException
- Specified by:
readBoolean
in interfaceDataInput
- Throws:
IOException
-
readByte
public final byte readByte() throws IOException
- Specified by:
readByte
in interfaceDataInput
- Throws:
IOException
-
readChar
public final char readChar() throws IOException
- Specified by:
readChar
in interfaceDataInput
- Throws:
IOException
-
readDouble
public final double readDouble() throws IOException
- Specified by:
readDouble
in interfaceDataInput
- Throws:
IOException
-
readFloat
public final float readFloat() throws IOException
- Specified by:
readFloat
in interfaceDataInput
- Throws:
IOException
-
readFully
public final void readFully(byte[] var0) throws IOException
- Specified by:
readFully
in interfaceDataInput
- Throws:
IOException
-
readFully
public final void readFully(byte[] var0, int var1, int var2) throws IOException
- Specified by:
readFully
in interfaceDataInput
- Throws:
IOException
-
readInt
public final int readInt() throws IOException
- Specified by:
readInt
in interfaceDataInput
- Throws:
IOException
-
readLine
public final String readLine() throws IOException
- Specified by:
readLine
in interfaceDataInput
- Throws:
IOException
-
readLong
public final long readLong() throws IOException
- Specified by:
readLong
in interfaceDataInput
- Throws:
IOException
-
readShort
public final short readShort() throws IOException
- Specified by:
readShort
in interfaceDataInput
- Throws:
IOException
-
readUnsignedByte
public final int readUnsignedByte() throws IOException
- Specified by:
readUnsignedByte
in interfaceDataInput
- Throws:
IOException
-
readUnsignedShort
public final int readUnsignedShort() throws IOException
- Specified by:
readUnsignedShort
in interfaceDataInput
- Throws:
IOException
-
readUTF
public final String readUTF() throws IOException
- Specified by:
readUTF
in interfaceDataInput
- Throws:
IOException
-
seek
public void seek(long var0) throws IOException
- Throws:
IOException
-
setLength
public void setLength(long var0) throws IOException
- Throws:
IOException
-
skipBytes
public int skipBytes(int var0) throws IOException
- Specified by:
skipBytes
in interfaceDataInput
- Throws:
IOException
-
write
public void write(byte[] var0) throws IOException
- Specified by:
write
in interfaceDataOutput
- Throws:
IOException
-
write
public void write(byte[] var0, int var1, int var2) throws IOException
- Specified by:
write
in interfaceDataOutput
- Throws:
IOException
-
write
public void write(int var0) throws IOException
- Specified by:
write
in interfaceDataOutput
- Throws:
IOException
-
writeBoolean
public final void writeBoolean(boolean var0) throws IOException
- Specified by:
writeBoolean
in interfaceDataOutput
- Throws:
IOException
-
writeByte
public final void writeByte(int var0) throws IOException
- Specified by:
writeByte
in interfaceDataOutput
- Throws:
IOException
-
writeBytes
public final void writeBytes(String var0) throws IOException
- Specified by:
writeBytes
in interfaceDataOutput
- Throws:
IOException
-
writeChar
public final void writeChar(int var0) throws IOException
- Specified by:
writeChar
in interfaceDataOutput
- Throws:
IOException
-
writeChars
public final void writeChars(String var0) throws IOException
- Specified by:
writeChars
in interfaceDataOutput
- Throws:
IOException
-
writeDouble
public final void writeDouble(double var0) throws IOException
- Specified by:
writeDouble
in interfaceDataOutput
- Throws:
IOException
-
writeFloat
public final void writeFloat(float var0) throws IOException
- Specified by:
writeFloat
in interfaceDataOutput
- Throws:
IOException
-
writeInt
public final void writeInt(int var0) throws IOException
- Specified by:
writeInt
in interfaceDataOutput
- Throws:
IOException
-
writeLong
public final void writeLong(long var0) throws IOException
- Specified by:
writeLong
in interfaceDataOutput
- Throws:
IOException
-
writeShort
public final void writeShort(int var0) throws IOException
- Specified by:
writeShort
in interfaceDataOutput
- Throws:
IOException
-
writeUTF
public final void writeUTF(String var0) throws IOException
- Specified by:
writeUTF
in interfaceDataOutput
- Throws:
IOException
-
-