<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Wed Jul 28 01:21:15 GMT 1999 -->
<title>
  Class java.io.RandomAccessFile
</title>
</head>
<body>
<a name="_top_"></a>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.io.html">This Package</a>  <a href="java.io.PushbackReader.html#_top_">Previous</a>  <a href="java.io.Reader.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class java.io.RandomAccessFile
</h1>
<pre>
<a href="java.lang.Object.html#_top_">java.lang.Object</a>
   |
   +----java.io.RandomAccessFile
</pre>
<hr>
<dl>
  <dt> public class <b>RandomAccessFile</b>
  <dt> extends <a href="java.lang.Object.html#_top_">Object</a>
  <dt> implements <a href="java.io.DataOutput.html#_top_">DataOutput</a>, <a href="java.io.DataInput.html#_top_">DataInput</a>
</dl>
Instances of this class support both reading and writing to a 
 random access file. An application can modify the position in the 
 file at which the next read or write occurs. 
 This class provides a sense of security
 by offering methods that allow specified mode accesses of 
 read-only or read-write to files.
<p>
<hr>
<a name="index"></a>
<h2>
  <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
</h2>
<dl>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#RandomAccessFile(java.io.File, java.lang.String)"><b>RandomAccessFile</b></a>(File, String)
  <dd>  Creates a random access file stream to read from, and optionally 
 to write to, the file specified by the <code>File</code> argument.
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#RandomAccessFile(java.lang.String, java.lang.String)"><b>RandomAccessFile</b></a>(String, String)
  <dd>  Creates a random access file stream to read from, and optionally 
 to write to, a file with the specified name.
</dl>
<h2>
  <img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#close()"><b>close</b></a>()
  <dd>  Closes this random access file stream and releases any system 
 resources associated with the stream.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getFD()"><b>getFD</b></a>()
  <dd>  Returns the opaque file descriptor object associated with this stream.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getFilePointer()"><b>getFilePointer</b></a>()
  <dd>  Returns the current offset in this file.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#length()"><b>length</b></a>()
  <dd>  Returns the length of this file.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#read()"><b>read</b></a>()
  <dd>  Reads a byte of data from this file.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#read(byte[])"><b>read</b></a>(byte[])
  <dd>  Reads up to <code>b.length</code> bytes of data from this file 
 into an array of bytes.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#read(byte[], int, int)"><b>read</b></a>(byte[], int, int)
  <dd>  Reads up to <code>len</code> bytes of data from this file into an 
 array of bytes.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#readBoolean()"><b>readBoolean</b></a>()
  <dd>  Reads a <code>boolean</code> from this file.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#readByte()"><b>readByte</b></a>()
  <dd>  Reads a signed 8-bit value from this file.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#readChar()"><b>readChar</b></a>()
  <dd>  Reads a Unicode character from this file.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#readDouble()"><b>readDouble</b></a>()
  <dd>  Reads a <code>double</code> from this file.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#readFloat()"><b>readFloat</b></a>()
  <dd>  Reads a <code>float</code> from this file.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#readFully(byte[])"><b>readFully</b></a>(byte[])
  <dd>  Reads <code>b.length</code> bytes from this file into the byte 
 array.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#readFully(byte[], int, int)"><b>readFully</b></a>(byte[], int, int)
  <dd>  Reads exactly <code>len</code> bytes from this file into the byte 
 array.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#readInt()"><b>readInt</b></a>()
  <dd>  Reads a signed 32-bit integer from this file.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#readLine()"><b>readLine</b></a>()
  <dd>  Reads the next line of text from this file.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#readLong()"><b>readLong</b></a>()
  <dd>  Reads a signed 64-bit integer from this file.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#readShort()"><b>readShort</b></a>()
  <dd>  Reads a signed 16-bit number from this file.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#readUnsignedByte()"><b>readUnsignedByte</b></a>()
  <dd>  Reads an unsigned 8-bit number from this file.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#readUnsignedShort()"><b>readUnsignedShort</b></a>()
  <dd>  Reads an unsigned 16-bit number from this file.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#readUTF()"><b>readUTF</b></a>()
  <dd>  Reads in a string from this file.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#seek(long)"><b>seek</b></a>(long)
  <dd>  Sets the file-pointer offset, measured from the beginning of this 
 file, at which the next read or write occurs.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#skipBytes(int)"><b>skipBytes</b></a>(int)
  <dd>  Skips exactly <code>n</code> bytes of input.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#write(byte[])"><b>write</b></a>(byte[])
  <dd>  Writes <code>b.length</code> bytes from the specified byte array 
 starting at offset <code>off</code> to this file.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#write(byte[], int, int)"><b>write</b></a>(byte[], int, int)
  <dd>  Writes <code>len</code> bytes from the specified byte array 
 starting at offset <code>off</code> to this file.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#write(int)"><b>write</b></a>(int)
  <dd>  Writes the specified byte to this file.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#writeBoolean(boolean)"><b>writeBoolean</b></a>(boolean)
  <dd>  Writes a <code>boolean</code> to the file as a 1-byte value.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#writeByte(int)"><b>writeByte</b></a>(int)
  <dd>  Writes a <code>byte</code> to the file as a 1-byte value.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#writeBytes(java.lang.String)"><b>writeBytes</b></a>(String)
  <dd>  Writes the string to the file as a sequence of bytes.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#writeChar(int)"><b>writeChar</b></a>(int)
  <dd>  Writes a <code>char</code> to the file as a 2-byte value, high
 byte first.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#writeChars(java.lang.String)"><b>writeChars</b></a>(String)
  <dd>  Writes a string to the file as a sequence of characters.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#writeDouble(double)"><b>writeDouble</b></a>(double)
  <dd>  Converts the double argument to a <code>long</code> using the 
 <code>doubleToLongBits</code> method in class <code>Double</code>, 
 and then writes that <code>long</code> value to the file as an 
 8-byte quantity, high byte first.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#writeFloat(float)"><b>writeFloat</b></a>(float)
  <dd>  Converts the float argument to an <code>int</code> using the 
 <code>floatToIntBits</code> method in class <code>Float</code>, 
 and then writes that <code>int</code> value to the file as a 
 4-byte quantity, high byte first.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#writeInt(int)"><b>writeInt</b></a>(int)
  <dd>  Writes an <code>int</code> to the file as four bytes, high byte first.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#writeLong(long)"><b>writeLong</b></a>(long)
  <dd>  Writes a <code>long</code> to the file as eight bytes, high byte first.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#writeShort(int)"><b>writeShort</b></a>(int)
  <dd>  Writes a <code>short</code> to the file as two bytes, high byte first.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#writeUTF(java.lang.String)"><b>writeUTF</b></a>(String)
  <dd>  Writes a string to the file using UTF-8 encoding in a 
 machine-independent manner.
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="RandomAccessFile"></a>
<a name="RandomAccessFile(java.lang.String, java.lang.String)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>RandomAccessFile</b>
<pre>
 public RandomAccessFile(<a href="java.lang.String.html#_top_">String</a> name,
                         <a href="java.lang.String.html#_top_">String</a> mode) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Creates a random access file stream to read from, and optionally 
 to write to, a file with the specified name. 
 <p>
 The mode argument must either be equal to <code>"r"</code> or 
 <code>"rw"</code>, indicating either to open the file for input or 
 for both input and output.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> name - the system-dependent filename.
    <dd> mode - the access mode.
    <dt> <b>Throws:</b> <a href="java.lang.IllegalArgumentException.html#_top_">IllegalArgumentException</a>
    <dd> if the mode argument is not equal
               to <code>"r"</code> or to <code>"rw"</code>.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
    <dt> <b>Throws:</b> <a href="java.lang.SecurityException.html#_top_">SecurityException</a>
    <dd> if a security manager exists, its
               <code>checkRead</code> method is called with the name
               argument to see if the application is allowed read access
               to the file. If the mode argument is equal to
               <code>"rw"</code>, its <code>checkWrite</code> method also
               is called with the name argument to see if the application
               is allowed write access to the file. Either of these may
               result in a security exception.
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.SecurityException.html#_top_">SecurityException</a>, <a href="java.lang.SecurityManager.html#checkRead(java.lang.String)">checkRead</a>
  </dl></dd>
</dl>
<a name="RandomAccessFile(java.io.File, java.lang.String)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>RandomAccessFile</b>
<pre>
 public RandomAccessFile(<a href="java.io.File.html#_top_">File</a> file,
                         <a href="java.lang.String.html#_top_">String</a> mode) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Creates a random access file stream to read from, and optionally 
 to write to, the file specified by the <code>File</code> argument. 
 <p>
 The mode argument must either be equal to <code>"r"</code> or to 
 <code>"rw"</code>, indicating either to open the file for input, 
 or for both input and output, respectively.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> file - the file object.
    <dd> mode - the access mode.
    <dt> <b>Throws:</b> <a href="java.lang.IllegalArgumentException.html#_top_">IllegalArgumentException</a>
    <dd> if the mode argument is not equal
               to <code>"r"</code> or to <code>"rw"</code>.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
    <dt> <b>Throws:</b> <a href="java.lang.SecurityException.html#_top_">SecurityException</a>
    <dd> if a security manager exists, its
               <code>checkRead</code> method is called with the pathname
               of the <code>File</code> argument to see if the
               application is allowed read access to the file. If the
               mode argument is equal to <code>"rw"</code>, its
               <code>checkWrite</code> method also is called with the
               pathname to see if the application is allowed write access
               to the file.
    <dt> <b>See Also:</b>
    <dd> <a href="java.io.File.html#getPath()">getPath</a>, <a href="java.lang.SecurityManager.html#checkRead(java.lang.String)">checkRead</a>
  </dl></dd>
</dl>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="getFD()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getFD"><b>getFD</b></a>
<pre>
 public final <a href="java.io.FileDescriptor.html#_top_">FileDescriptor</a> getFD() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Returns the opaque file descriptor object associated with this stream.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the file descriptor object associated with this stream.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
    <dt> <b>See Also:</b>
    <dd> <a href="java.io.FileDescriptor.html#_top_">FileDescriptor</a>
  </dl></dd>
</dl>
<a name="read()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="read"><b>read</b></a>
<pre>
 public native int read() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Reads a byte of data from this file. This method blocks if no 
 input is yet available.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the next byte of data, or <code>-1</code> if the end of the
             file is reached.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
  </dl></dd>
</dl>
<a name="read(byte[], int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="read"><b>read</b></a>
<pre>
 public int read(byte b[],
                 int off,
                 int len) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Reads up to <code>len</code> bytes of data from this file into an 
 array of bytes. This method blocks until at least one byte of input 
 is available.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> b - the buffer into which the data is read.
    <dd> off - the start offset of the data.
    <dd> len - the maximum number of bytes read.
    <dt> <b>Returns:</b>
    <dd> the total number of bytes read into the buffer, or
             <code>-1</code> if there is no more data because the end of
             the file has been reached.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
  </dl></dd>
</dl>
<a name="read(byte[])"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="read"><b>read</b></a>
<pre>
 public int read(byte b[]) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Reads up to <code>b.length</code> bytes of data from this file 
 into an array of bytes. This method blocks until at least one byte 
 of input is available.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> b - the buffer into which the data is read.
    <dt> <b>Returns:</b>
    <dd> the total number of bytes read into the buffer, or
             <code>-1</code> if there is no more data because the end of
             this file has been reached.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
  </dl></dd>
</dl>
<a name="readFully(byte[])"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="readFully"><b>readFully</b></a>
<pre>
 public final void readFully(byte b[]) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Reads <code>b.length</code> bytes from this file into the byte 
 array. This method reads repeatedly from the file until all the 
 bytes are read. This method blocks until all the bytes are read, 
 the end of the stream is detected, or an exception is thrown.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> b - the buffer into which the data is read.
    <dt> <b>Throws:</b> <a href="java.io.EOFException.html#_top_">EOFException</a>
    <dd> if this file reaches the end before reading
               all the bytes.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
  </dl></dd>
</dl>
<a name="readFully(byte[], int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="readFully"><b>readFully</b></a>
<pre>
 public final void readFully(byte b[],
                             int off,
                             int len) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Reads exactly <code>len</code> bytes from this file into the byte 
 array. This method reads repeatedly from the file until all the 
 bytes are read. This method blocks until all the bytes are read, 
 the end of the stream is detected, or an exception is thrown.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> b - the buffer into which the data is read.
    <dd> off - the start offset of the data.
    <dd> len - the number of bytes to read.
    <dt> <b>Throws:</b> <a href="java.io.EOFException.html#_top_">EOFException</a>
    <dd> if this file reaches the end before reading
               all the bytes.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
  </dl></dd>
</dl>
<a name="skipBytes(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="skipBytes"><b>skipBytes</b></a>
<pre>
 public int skipBytes(int n) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Skips exactly <code>n</code> bytes of input. 
 <p>
 This method blocks until all the bytes are skipped, the end of 
 the stream is detected, or an exception is thrown.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> n - the number of bytes to be skipped.
    <dt> <b>Returns:</b>
    <dd> the number of bytes skipped, which is always <code>n</code>.
    <dt> <b>Throws:</b> <a href="java.io.EOFException.html#_top_">EOFException</a>
    <dd> if this file reaches the end before skipping
               all the bytes.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
  </dl></dd>
</dl>
<a name="write(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="write"><b>write</b></a>
<pre>
 public native void write(int b) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Writes the specified byte to this file.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> b - the <code>byte</code> to be written.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
  </dl></dd>
</dl>
<a name="write(byte[])"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="write"><b>write</b></a>
<pre>
 public void write(byte b[]) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Writes <code>b.length</code> bytes from the specified byte array 
 starting at offset <code>off</code> to this file.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> b - the data.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
  </dl></dd>
</dl>
<a name="write(byte[], int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="write"><b>write</b></a>
<pre>
 public void write(byte b[],
                   int off,
                   int len) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Writes <code>len</code> bytes from the specified byte array 
 starting at offset <code>off</code> to this file.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> b - the data.
    <dd> off - the start offset in the data.
    <dd> len - the number of bytes to write.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
  </dl></dd>
</dl>
<a name="getFilePointer()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getFilePointer"><b>getFilePointer</b></a>
<pre>
 public native long getFilePointer() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Returns the current offset in this file.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the offset from the beginning of the file, in bytes,
             at which the next read or write occurs.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
  </dl></dd>
</dl>
<a name="seek(long)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="seek"><b>seek</b></a>
<pre>
 public native void seek(long pos) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Sets the file-pointer offset, measured from the beginning of this 
 file, at which the next read or write occurs.  The offset may be 
 set beyond the end of the file. Setting the offset beyond the end 
 of the file does not change the file length.  The file length will 
 change only by writing after the offset has been set beyond the end 
 of the file.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> pos - the offset position, measured in bytes from the
                   beginning of the file, at which to set the file 
                   pointer.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
  </dl></dd>
</dl>
<a name="length()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="length"><b>length</b></a>
<pre>
 public native long length() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Returns the length of this file.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the length of this file.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
  </dl></dd>
</dl>
<a name="close()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="close"><b>close</b></a>
<pre>
 public native void close() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Closes this random access file stream and releases any system 
 resources associated with the stream.
<p>
  <dd><dl>
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
  </dl></dd>
</dl>
<a name="readBoolean()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="readBoolean"><b>readBoolean</b></a>
<pre>
 public final boolean readBoolean() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Reads a <code>boolean</code> from this file. This method reads a 
 single byte from the file. A value of <code>0</code> represents 
 <code>false</code>. Any other value represents <code>true</code>. 
 This method blocks until the byte is read, the end of the stream 
 is detected, or an exception is thrown.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the <code>boolean</code> value read.
    <dt> <b>Throws:</b> <a href="java.io.EOFException.html#_top_">EOFException</a>
    <dd> if this file has reached the end.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
  </dl></dd>
</dl>
<a name="readByte()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="readByte"><b>readByte</b></a>
<pre>
 public final byte readByte() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Reads a signed 8-bit value from this file. This method reads a 
 byte from the file. If the byte read is <code>b</code>, where 
 <code>0&nbsp;&lt;=&nbsp;b&nbsp;&lt;=&nbsp;255</code>, 
 then the result is:
 <ul><code>
     (byte)(b)
</code></ul>
 <p>
 This method blocks until the byte is read, the end of the stream 
 is detected, or an exception is thrown.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the next byte of this file as a signed 8-bit
             <code>byte</code>.
    <dt> <b>Throws:</b> <a href="java.io.EOFException.html#_top_">EOFException</a>
    <dd> if this file has reached the end.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
  </dl></dd>
</dl>
<a name="readUnsignedByte()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="readUnsignedByte"><b>readUnsignedByte</b></a>
<pre>
 public final int readUnsignedByte() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Reads an unsigned 8-bit number from this file. This method reads 
 a byte from this file and returns that byte. 
 <p>
 This method blocks until the byte is read, the end of the stream 
 is detected, or an exception is thrown.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the next byte of this file, interpreted as an unsigned
             8-bit number.
    <dt> <b>Throws:</b> <a href="java.io.EOFException.html#_top_">EOFException</a>
    <dd> if this file has reached the end.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
  </dl></dd>
</dl>
<a name="readShort()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="readShort"><b>readShort</b></a>
<pre>
 public final short readShort() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Reads a signed 16-bit number from this file. The method reads 2 
 bytes from this file. If the two bytes read, in order, are 
 <code>b1</code> and <code>b2</code>, where each of the two values is 
 between <code>0</code> and <code>255</code>, inclusive, then the 
 result is equal to:
 <ul><code>
     (short)((b1 &lt;&lt; 8) | b2)
 </code></ul>
 <p>
 This method blocks until the two bytes are read, the end of the 
 stream is detected, or an exception is thrown.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the next two bytes of this file, interpreted as a signed
             16-bit number.
    <dt> <b>Throws:</b> <a href="java.io.EOFException.html#_top_">EOFException</a>
    <dd> if this file reaches the end before reading
               two bytes.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
  </dl></dd>
</dl>
<a name="readUnsignedShort()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="readUnsignedShort"><b>readUnsignedShort</b></a>
<pre>
 public final int readUnsignedShort() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Reads an unsigned 16-bit number from this file. This method reads 
 two bytes from the file. If the bytes read, in order, are 
 <code>b1</code> and <code>b2</code>, where 
 <code>0&nbsp;&lt;=&nbsp;b1, b2&nbsp;&lt;=&nbsp;255</code>, 
 then the result is equal to:
 <ul><code>
     (b1 &lt;&lt; 8) | b2
 </code></ul>
 <p>
 This method blocks until the two bytes are read, the end of the 
 stream is detected, or an exception is thrown.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the next two bytes of this file, interpreted as an unsigned
             16-bit integer.
    <dt> <b>Throws:</b> <a href="java.io.EOFException.html#_top_">EOFException</a>
    <dd> if this file reaches the end before reading
               two bytes.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
  </dl></dd>
</dl>
<a name="readChar()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="readChar"><b>readChar</b></a>
<pre>
 public final char readChar() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Reads a Unicode character from this file. This method reads two
 bytes from the file. If the bytes read, in order, are 
 <code>b1</code> and <code>b2</code>, where 
 <code>0&nbsp;&lt;=&nbsp;b1,&nbsp;b2&nbsp;&lt;=&nbsp;255</code>, 
 then the result is equal to:
 <ul><code>
     (char)((b1 &lt;&lt; 8) | b2)
 </code></ul>
 <p>
 This method blocks until the two bytes are read, the end of the 
 stream is detected, or an exception is thrown.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the next two bytes of this file as a Unicode character.
    <dt> <b>Throws:</b> <a href="java.io.EOFException.html#_top_">EOFException</a>
    <dd> if this file reaches the end before reading
               two bytes.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
  </dl></dd>
</dl>
<a name="readInt()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="readInt"><b>readInt</b></a>
<pre>
 public final int readInt() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Reads a signed 32-bit integer from this file. This method reads 4 
 bytes from the file. If the bytes read, in order, are <code>b1</code>,
 <code>b2</code>, <code>b3</code>, and <code>b4</code>, where 
 <code>0&nbsp;&lt;=&nbsp;b1, b2, b3, b4&nbsp;&lt;=&nbsp;255</code>, 
 then the result is equal to:
 <ul><code>
     (b1 &lt;&lt; 24) | (b2 &lt;&lt; 16) + (b3 &lt;&lt; 8) + b4
 </code></ul>
 <p>
 This method blocks until the four bytes are read, the end of the 
 stream is detected, or an exception is thrown.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the next four bytes of this file, interpreted as an
             <code>int</code>.
    <dt> <b>Throws:</b> <a href="java.io.EOFException.html#_top_">EOFException</a>
    <dd> if this file reaches the end before reading
               four bytes.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
  </dl></dd>
</dl>
<a name="readLong()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="readLong"><b>readLong</b></a>
<pre>
 public final long readLong() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Reads a signed 64-bit integer from this file. This method reads eight
 bytes from the file. If the bytes read, in order, are 
 <code>b1</code>, <code>b2</code>, <code>b3</code>, 
 <code>b4</code>, <code>b5</code>, <code>b6</code>, 
 <code>b7</code>, and <code>b8,</code> where:
 <ul><code>
     0 &lt;= b1, b2, b3, b4, b5, b6, b7, b8 &lt;=255,
 </code></ul>
 <p>
 then the result is equal to:
 <p><blockquote><pre>
     ((long)b1 &lt;&lt; 56) + ((long)b2 &lt;&lt; 48)
     + ((long)b3 &lt;&lt; 40) + ((long)b4 &lt;&lt; 32)
     + ((long)b5 &lt;&lt; 24) + ((long)b6 &lt;&lt; 16)
     + ((long)b7 &lt;&lt; 8) + b8
 </pre></blockquote>
 <p>
 This method blocks until the eight bytes are read, the end of the 
 stream is detected, or an exception is thrown.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the next eight bytes of this file, interpreted as a
             <code>long</code>.
    <dt> <b>Throws:</b> <a href="java.io.EOFException.html#_top_">EOFException</a>
    <dd> if this file reaches the end before reading
               eight bytes.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
  </dl></dd>
</dl>
<a name="readFloat()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="readFloat"><b>readFloat</b></a>
<pre>
 public final float readFloat() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Reads a <code>float</code> from this file. This method reads an 
 <code>int</code> value as if by the <code>readInt</code> method 
 and then converts that <code>int</code> to a <code>float</code> 
 using the <code>intBitsToFloat</code> method in class 
 <code>Float</code>. 
 <p>
 This method blocks until the four bytes are read, the end of the 
 stream is detected, or an exception is thrown.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the next four bytes of this file, interpreted as a
             <code>float</code>.
    <dt> <b>Throws:</b> <a href="java.io.EOFException.html#_top_">EOFException</a>
    <dd> if this file reaches the end before reading
             four bytes.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
    <dt> <b>See Also:</b>
    <dd> <a href="#readInt()">readInt</a>, <a href="java.lang.Float.html#intBitsToFloat(int)">intBitsToFloat</a>
  </dl></dd>
</dl>
<a name="readDouble()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="readDouble"><b>readDouble</b></a>
<pre>
 public final double readDouble() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Reads a <code>double</code> from this file. This method reads a 
 <code>long</code> value as if by the <code>readLong</code> method 
 and then converts that <code>long</code> to a <code>double</code> 
 using the <code>longBitsToDouble</code> method in 
 class <code>Double</code>.
 <p>
 This method blocks until the eight bytes are read, the end of the 
 stream is detected, or an exception is thrown.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the next eight bytes of this file, interpreted as a
             <code>double</code>.
    <dt> <b>Throws:</b> <a href="java.io.EOFException.html#_top_">EOFException</a>
    <dd> if this file reaches the end before reading
             eight bytes.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
    <dt> <b>See Also:</b>
    <dd> <a href="#readLong()">readLong</a>, <a href="java.lang.Double.html#longBitsToDouble(long)">longBitsToDouble</a>
  </dl></dd>
</dl>
<a name="readLine()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="readLine"><b>readLine</b></a>
<pre>
 public final <a href="java.lang.String.html#_top_">String</a> readLine() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Reads the next line of text from this file. This method 
 successively reads bytes from the file until it reaches the end of 
 a line of text. 
 <p>
 A line of text is terminated by a carriage-return character 
 (<code>'&#92;r'</code>), a newline character (<code>'&#92;n'</code>), a 
 carriage-return character immediately followed by a newline 
 character, or the end of the input stream. The line-terminating 
 character(s), if any, are included as part of the string returned. 
 <p>
 This method blocks until a newline character is read, a carriage 
 return and the byte following it are read (to see if it is a 
 newline), the end of the stream is detected, or an exception is thrown.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the next line of text from this file.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
  </dl></dd>
</dl>
<a name="readUTF()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="readUTF"><b>readUTF</b></a>
<pre>
 public final <a href="java.lang.String.html#_top_">String</a> readUTF() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Reads in a string from this file. The string has been encoded 
 using a modified UTF-8 format. 
 <p>
 The first two bytes are read as if by 
 <code>readUnsignedShort</code>. This value gives the number of 
 following bytes that are in the encoded string, not
 the length of the resulting string. The following bytes are then 
 interpreted as bytes encoding characters in the UTF-8 format 
 and are converted into characters. 
 <p>
 This method blocks until all the bytes are read, the end of the 
 stream is detected, or an exception is thrown.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> a Unicode string.
    <dt> <b>Throws:</b> <a href="java.io.EOFException.html#_top_">EOFException</a>
    <dd> if this file reaches the end before
               reading all the bytes.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
    <dt> <b>Throws:</b> <a href="java.io.UTFDataFormatException.html#_top_">UTFDataFormatException</a>
    <dd> if the bytes do not represent
               valid UTF-8 encoding of a Unicode string.
    <dt> <b>See Also:</b>
    <dd> <a href="#readUnsignedShort()">readUnsignedShort</a>
  </dl></dd>
</dl>
<a name="writeBoolean(boolean)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="writeBoolean"><b>writeBoolean</b></a>
<pre>
 public final void writeBoolean(boolean v) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Writes a <code>boolean</code> to the file as a 1-byte value. The 
 value <code>true</code> is written out as the value 
 <code>(byte)1</code>; the value <code>false</code> is written out 
 as the value <code>(byte)0</code>.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> v - a <code>boolean</code> value to be written.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
  </dl></dd>
</dl>
<a name="writeByte(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="writeByte"><b>writeByte</b></a>
<pre>
 public final void writeByte(int v) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Writes a <code>byte</code> to the file as a 1-byte value.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> v - a <code>byte</code> value to be written.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
  </dl></dd>
</dl>
<a name="writeShort(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="writeShort"><b>writeShort</b></a>
<pre>
 public final void writeShort(int v) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Writes a <code>short</code> to the file as two bytes, high byte first.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> v - a <code>short</code> to be written.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
  </dl></dd>
</dl>
<a name="writeChar(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="writeChar"><b>writeChar</b></a>
<pre>
 public final void writeChar(int v) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Writes a <code>char</code> to the file as a 2-byte value, high
 byte first.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> v - a <code>char</code> value to be written.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
  </dl></dd>
</dl>
<a name="writeInt(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="writeInt"><b>writeInt</b></a>
<pre>
 public final void writeInt(int v) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Writes an <code>int</code> to the file as four bytes, high byte first.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> v - an <code>int</code> to be written.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
  </dl></dd>
</dl>
<a name="writeLong(long)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="writeLong"><b>writeLong</b></a>
<pre>
 public final void writeLong(long v) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Writes a <code>long</code> to the file as eight bytes, high byte first.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> v - a <code>long</code> to be written.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
  </dl></dd>
</dl>
<a name="writeFloat(float)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="writeFloat"><b>writeFloat</b></a>
<pre>
 public final void writeFloat(float v) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Converts the float argument to an <code>int</code> using the 
 <code>floatToIntBits</code> method in class <code>Float</code>, 
 and then writes that <code>int</code> value to the file as a 
 4-byte quantity, high byte first.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> v - a <code>float</code> value to be written.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.Float.html#floatToIntBits(float)">floatToIntBits</a>
  </dl></dd>
</dl>
<a name="writeDouble(double)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="writeDouble"><b>writeDouble</b></a>
<pre>
 public final void writeDouble(double v) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Converts the double argument to a <code>long</code> using the 
 <code>doubleToLongBits</code> method in class <code>Double</code>, 
 and then writes that <code>long</code> value to the file as an 
 8-byte quantity, high byte first.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> v - a <code>double</code> value to be written.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
    <dt> <b>See Also:</b>
    <dd> <a href="java.lang.Double.html#doubleToLongBits(double)">doubleToLongBits</a>
  </dl></dd>
</dl>
<a name="writeBytes(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="writeBytes"><b>writeBytes</b></a>
<pre>
 public final void writeBytes(<a href="java.lang.String.html#_top_">String</a> s) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Writes the string to the file as a sequence of bytes. Each 
 character in the string is written out, in sequence, by discarding 
 its high eight bits.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> s - a string of bytes to be written.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
  </dl></dd>
</dl>
<a name="writeChars(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="writeChars"><b>writeChars</b></a>
<pre>
 public final void writeChars(<a href="java.lang.String.html#_top_">String</a> s) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Writes a string to the file as a sequence of characters. Each 
 character is written to the data output stream as if by the 
 <code>writeChar</code> method.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> s - a <code>String</code> value to be written.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
    <dt> <b>See Also:</b>
    <dd> <a href="#writeChar(int)">writeChar</a>
  </dl></dd>
</dl>
<a name="writeUTF(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="writeUTF"><b>writeUTF</b></a>
<pre>
 public final void writeUTF(<a href="java.lang.String.html#_top_">String</a> str) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Writes a string to the file using UTF-8 encoding in a 
 machine-independent manner. 
 <p>
 First, two bytes are written to the file as if by the 
 <code>writeShort</code> method giving the number of bytes to 
 follow. This value is the number of bytes actually written out, 
 not the length of the string. Following the length, each character 
 of the string is output, in sequence, using the UTF-8 encoding 
 for each character.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> str - a string to be written.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs.
  </dl></dd>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.io.html">This Package</a>  <a href="java.io.PushbackReader.html#_top_">Previous</a>  <a href="java.io.Reader.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
