Method Summary |
|
public void | close() Close this RandomAccessFile. |
final public synchronized FileChannel | getChannel() Answers the FileChannel equivalent to this stream.
The file channel is write-only and has an initial position within the
file that is the same as the current position of this FileOutputStream
within the file. |
final public FileDescriptor | getFD() Answers the FileDescriptor representing the operating system resource for
this RandomAccessFile. |
public long | getFilePointer() Answers the current position within this RandomAccessFile. |
public long | length() Answers the current length of this RandomAccessFile in bytes. |
public int | read() Reads a single byte from this RandomAccessFile and returns the result as
an int. |
public int | read(byte[] buffer) Reads bytes from this RandomAccessFile into the byte array
buffer . |
public int | read(byte[] buffer, int offset, int count) Reads at most count bytes from this RandomAccessFile and
stores them in byte array buffer starting at
offset . |
final public boolean | readBoolean() Reads a boolean from this stream. |
final public byte | readByte() Reads an 8-bit byte value from this stream. |
final public char | readChar() Reads a 16-bit character value from this stream. |
final public double | readDouble() Reads a 64-bit double value from this stream. |
final public float | readFloat() Reads a 32-bit float value from this stream. |
final public void | readFully(byte[] buffer) Reads bytes from this stream into the byte array buffer . |
final public void | readFully(byte[] buffer, int offset, int count) Read bytes from this stream and stores them in byte array
buffer starting at offset offset . |
final public int | readInt() Reads a 32-bit integer value from this stream. |
final public String | readLine() Answers a String representing the next line of text
available in this BufferedReader. |
final public long | readLong() Reads a 64-bit long value from this stream. |
final public short | readShort() Reads a 16-bit short value from this stream. |
final public String | readUTF() Reads a UTF format String from this Stream. |
final public int | readUnsignedByte() Reads an unsigned 8-bit byte value from this stream and
returns it as an int. |
final public int | readUnsignedShort() Reads a 16-bit unsigned short value from this stream and
returns it as an int. |
public void | seek(long pos) Seeks to the position pos in this RandomAccessFile. |
public void | setLength(long newLength) Set the length of this file to be newLength . |
public int | skipBytes(int count) Skips count number of bytes in this stream. |
public void | write(byte[] buffer) Writes the entire contents of the byte array buffer to
this RandomAccessFile starting at the current file pointer. |
public void | write(byte[] buffer, int offset, int count) Writes count bytes from the byte array buffer
starting at offset to this RandomAccessFile starting at
the current file pointer.. |
public void | write(int oneByte) Writes the specified byte oneByte to this RandomAccessFile
starting at the current file pointer. |
final public void | writeBoolean(boolean val) Writes a boolean to this output stream. |
final public void | writeByte(int val) Writes a 8-bit byte to this output stream. |
final public void | writeBytes(String str) Writes the low order 8-bit bytes from a String to this output stream. |
final public void | writeChar(int val) Writes the specified 16-bit character to the OutputStream. |
final public void | writeChars(String str) Writes the specified 16-bit characters contained in str to the
OutputStream. |
final public void | writeDouble(double val) Writes a 64-bit double to this output stream. |
final public void | writeFloat(float val) Writes a 32-bit float to this output stream. |
final public void | writeInt(int val) Writes a 32-bit int to this output stream. |
final public void | writeLong(long val) Writes a 64-bit long to this output stream. |
final public void | writeShort(int val) Writes the specified 16-bit short to the OutputStream. |
final public void | writeUTF(String str) Writes the specified String out in UTF format. |