org.gridlab.gat.io
Class RandomAccessFile

java.lang.Object
  extended by java.io.RandomAccessFile
      extended by org.gridlab.gat.io.RandomAccessFile
All Implemented Interfaces:
Closeable, DataInput, DataOutput

public class RandomAccessFile
extends RandomAccessFile

This class is used for random access to local and remote files.

An instance of this class presents an abstract, system-independent view of a physical file.


Constructor Summary
RandomAccessFile(org.gridlab.gat.io.RandomAccessFileInterface f)
           
 
Method Summary
 void close()
           
 long getFilePointer()
           
 long length()
           
 int read()
           
 int read(byte[] b)
           
 int read(byte[] b, int off, int len)
           
 void seek(long pos)
           
 void setLength(long newLength)
           
 int skipBytes(int n)
           
 URI toURI()
           
 void write(byte[] b)
           
 void write(byte[] b, int off, int len)
           
 void write(int b)
           
 
Methods inherited from class java.io.RandomAccessFile
getChannel, getFD, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomAccessFile

public RandomAccessFile(org.gridlab.gat.io.RandomAccessFileInterface f)
                 throws FileNotFoundException
Throws:
FileNotFoundException
Method Detail

toURI

public URI toURI()
See Also:
File.toURI()

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class RandomAccessFile
Throws:
IOException

getFilePointer

public long getFilePointer()
                    throws IOException
Overrides:
getFilePointer in class RandomAccessFile
Throws:
IOException

length

public long length()
            throws IOException
Overrides:
length in class RandomAccessFile
Throws:
IOException

read

public int read()
         throws IOException
Overrides:
read in class RandomAccessFile
Throws:
IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Overrides:
read in class RandomAccessFile
Throws:
IOException

read

public int read(byte[] b)
         throws IOException
Overrides:
read in class RandomAccessFile
Throws:
IOException

seek

public void seek(long pos)
          throws IOException
Overrides:
seek in class RandomAccessFile
Throws:
IOException

setLength

public void setLength(long newLength)
               throws IOException
Overrides:
setLength in class RandomAccessFile
Throws:
IOException

skipBytes

public int skipBytes(int n)
              throws IOException
Specified by:
skipBytes in interface DataInput
Overrides:
skipBytes in class RandomAccessFile
Throws:
IOException

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Specified by:
write in interface DataOutput
Overrides:
write in class RandomAccessFile
Throws:
IOException

write

public void write(byte[] b)
           throws IOException
Specified by:
write in interface DataOutput
Overrides:
write in class RandomAccessFile
Throws:
IOException

write

public void write(int b)
           throws IOException
Specified by:
write in interface DataOutput
Overrides:
write in class RandomAccessFile
Throws:
IOException