void
|
close()
Closes this random access file stream and releases any system
resources associated with the stream.
|
final
FileChannel
|
getChannel()
Returns the unique FileChannel
object associated with this file.
|
final
FileDescriptor
|
getFD()
Returns the opaque file descriptor object associated with this
stream.
|
long
|
getFilePointer()
Returns the current offset in this file.
|
long
|
length()
Returns the length of this file.
|
int
|
read(byte[] b, int off, int len)
Reads up to len bytes of data from this file into an
array of bytes.
|
int
|
read(byte[] b)
Reads up to b.length bytes of data from this file
into an array of bytes.
|
int
|
read()
Reads a byte of data from this file.
|
final
boolean
|
readBoolean()
Reads a boolean from this file.
|
final
byte
|
readByte()
Reads a signed eight-bit value from this file.
|
final
char
|
readChar()
Reads a character from this file.
|
final
double
|
readDouble()
Reads a double from this file.
|
final
float
|
readFloat()
Reads a float from this file.
|
final
void
|
readFully(byte[] b)
Reads b.length bytes from this file into the byte
array, starting at the current file pointer.
|
final
void
|
readFully(byte[] b, int off, int len)
Reads exactly len bytes from this file into the byte
array, starting at the current file pointer.
|
final
int
|
readInt()
Reads a signed 32-bit integer from this file.
|
final
String
|
readLine()
Reads the next line of text from this file.
|
final
long
|
readLong()
Reads a signed 64-bit integer from this file.
|
final
short
|
readShort()
Reads a signed 16-bit number from this file.
|
final
String
|
readUTF()
Reads in a string from this file.
|
final
int
|
readUnsignedByte()
Reads an unsigned eight-bit number from this file.
|
final
int
|
readUnsignedShort()
Reads an unsigned 16-bit number from this file.
|
void
|
seek(long pos)
Sets the file-pointer offset, measured from the beginning of this
file, at which the next read or write occurs.
|
void
|
setLength(long newLength)
Sets the length of this file.
|
int
|
skipBytes(int n)
Attempts to skip over n bytes of input discarding the
skipped bytes.
|
void
|
write(int b)
Writes the specified byte to this file.
|
void
|
write(byte[] b, int off, int len)
Writes len bytes from the specified byte array
starting at offset off to this file.
|
void
|
write(byte[] b)
Writes b.length bytes from the specified byte array
to this file, starting at the current file pointer.
|
final
void
|
writeBoolean(boolean v)
Writes a boolean to the file as a one-byte value.
|
final
void
|
writeByte(int v)
Writes a byte to the file as a one-byte value.
|
final
void
|
writeBytes(String s)
Writes the string to the file as a sequence of bytes.
|
final
void
|
writeChar(int v)
Writes a char to the file as a two-byte value, high
byte first.
|
final
void
|
writeChars(String s)
Writes a string to the file as a sequence of characters.
|
final
void
|
writeDouble(double v)
Converts the double argument to a long using the
doubleToLongBits method in class Double ,
and then writes that long value to the file as an
eight-byte quantity, high byte first.
|
final
void
|
writeFloat(float v)
Converts the float argument to an int using the
floatToIntBits method in class Float ,
and then writes that int value to the file as a
four-byte quantity, high byte first.
|
final
void
|
writeInt(int v)
Writes an int to the file as four bytes, high byte first.
|
final
void
|
writeLong(long v)
Writes a long to the file as eight bytes, high byte first.
|
final
void
|
writeShort(int v)
Writes a short to the file as two bytes, high byte first.
|
final
void
|
writeUTF(String str)
Writes a string to the file using
modified UTF-8
encoding in a machine-independent manner.
|