THE PACKAGE JAVA.IO
java.io.RandomAccessFile
22.23
22.23 The Class
java.io.RandomAccessFile
A random access file behaves like a large array of bytes stored in the file system.
There is a kind of cursor, or index into the implied array, called the
file pointer
;
input operations read bytes starting at the file pointer and advance the file pointer
past the bytes read. If the random access file is created in read/write mode, then
output operations are also available; output operations write bytes starting at the
file pointer and advance the file pointer past the bytes written. Output operations
that write past the current end of the implied array cause the array to be extended.
The file pointer can be read by the
getFilePointer
 method and set by the
seek
method.
public class RandomAccessFile implements DataOutput, DataInput {
public RandomAccessFile(String path, String mode)
throws SecurityException, IOException,
IllegalArgumentException;
public RandomAccessFile(File file, String mode)
throws SecurityException, IOException,
IllegalArgumentException;
public final FileDescriptor getFD() throws IOException;
public native long getFilePointer() throws IOException;
public native void seek(long pos) throws IOException;
public native long length() throws IOException;
public native void close() throws IOException;
public native int read() throws IOException;
public int read(byte[] b)
throws IOException, NullPointerException;
public int read(byte[] b, int off, int len)
throws IOException, NullPointerException,
IndexOutOfBoundsException;
// The methods that implement interface DataInput:
public final void readFully(byte[] b)
throws IOException, NullPointerException;
public final void readFully(byte[] b, int off, int len)
throws IOException, NullPointerException,
IndexOutOfBoundsException;
public int skipBytes(int n) throws IOException;
public final boolean readBoolean() throws IOException;
public final byte readByte() throws IOException;
public final int readUnsignedByte() throws IOException;
public final short readShort() throws IOException;
public final int readUnsignedShort() throws IOException;
public final char readChar() throws IOException;
public final int readInt() throws IOException;
743






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

java hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved