com.partnersoft.io.vfs
Class AbstractVfsRandomAccess

java.lang.Object
  extended by com.partnersoft.io.vfs.AbstractVfsRandomAccess
All Implemented Interfaces:
VfsRandomAccess, java.io.DataInput, java.io.DataOutput

public abstract class AbstractVfsRandomAccess
extends java.lang.Object
implements VfsRandomAccess

A random-access file in a Vfs. Subclasses implement real functionality.

Copyright 2004 Partner Software, Inc.

Version:
$Id: AbstractVfsRandomAccess.java 1946 2009-06-29 13:17:15Z paul $
Author:
Paul Reavis

Constructor Summary
AbstractVfsRandomAccess(VfsFile file)
           
 
Method Summary
 VfsFile getFile()
          The VfsFile this VfsRandomAccess is accessing.
 boolean isWritable()
          True if this is a read-write file.
 boolean readBoolean()
           
 byte readByte()
           
 char readChar()
           
 double readDouble()
           
 float readFloat()
           
 void readFully(byte[] buffer)
           
 void readFully(byte[] buffer, int offset, int length)
           
 int readInt()
           
 java.lang.String readLine()
           
 long readLong()
           
 short readShort()
           
 int readUnsignedByte()
           
 int readUnsignedShort()
           
 java.lang.String readUTF()
           
 void setWritable(boolean tizit)
          Attempt to set this to writable.
 int skipBytes(int count)
           
 void write(byte[] buffer)
           
 void writeBoolean(boolean value)
           
 void writeByte(int value)
           
 void writeBytes(java.lang.String byteString)
           
 void writeChar(int value)
           
 void writeChars(java.lang.String byteString)
           
 void writeDouble(double value)
           
 void writeFloat(float value)
           
 void writeInt(int value)
           
 void writeLong(long value)
           
 void writeShort(int value)
           
 void writeUTF(java.lang.String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.partnersoft.io.vfs.VfsRandomAccess
close, getLength, getPosition, read, setLength, setPosition
 
Methods inherited from interface java.io.DataOutput
write, write
 

Constructor Detail

AbstractVfsRandomAccess

public AbstractVfsRandomAccess(VfsFile file)
Method Detail

getFile

public VfsFile getFile()
Description copied from interface: VfsRandomAccess
The VfsFile this VfsRandomAccess is accessing.

Specified by:
getFile in interface VfsRandomAccess

isWritable

public boolean isWritable()
Description copied from interface: VfsRandomAccess
True if this is a read-write file.

Specified by:
isWritable in interface VfsRandomAccess

setWritable

public void setWritable(boolean tizit)
Description copied from interface: VfsRandomAccess
Attempt to set this to writable.

Specified by:
setWritable in interface VfsRandomAccess

readFully

public void readFully(byte[] buffer)
               throws java.io.IOException
Specified by:
readFully in interface java.io.DataInput
Throws:
java.io.IOException

readFully

public void readFully(byte[] buffer,
                      int offset,
                      int length)
               throws java.io.IOException
Specified by:
readFully in interface java.io.DataInput
Throws:
java.io.IOException

write

public void write(byte[] buffer)
           throws java.io.IOException
Specified by:
write in interface java.io.DataOutput
Throws:
java.io.IOException

readLong

public long readLong()
              throws java.io.IOException
Specified by:
readLong in interface java.io.DataInput
Throws:
java.io.IOException

readByte

public byte readByte()
              throws java.io.IOException
Specified by:
readByte in interface java.io.DataInput
Throws:
java.io.IOException

readBoolean

public boolean readBoolean()
                    throws java.io.IOException
Specified by:
readBoolean in interface java.io.DataInput
Throws:
java.io.IOException

readChar

public char readChar()
              throws java.io.IOException
Specified by:
readChar in interface java.io.DataInput
Throws:
java.io.IOException

readFloat

public float readFloat()
                throws java.io.IOException
Specified by:
readFloat in interface java.io.DataInput
Throws:
java.io.IOException

readDouble

public double readDouble()
                  throws java.io.IOException
Specified by:
readDouble in interface java.io.DataInput
Throws:
java.io.IOException

readInt

public int readInt()
            throws java.io.IOException
Specified by:
readInt in interface java.io.DataInput
Throws:
java.io.IOException

readLine

public java.lang.String readLine()
                          throws java.io.IOException
Specified by:
readLine in interface java.io.DataInput
Throws:
java.io.IOException

readUnsignedByte

public int readUnsignedByte()
                     throws java.io.IOException
Specified by:
readUnsignedByte in interface java.io.DataInput
Throws:
java.io.IOException

readUnsignedShort

public int readUnsignedShort()
                      throws java.io.IOException
Specified by:
readUnsignedShort in interface java.io.DataInput
Throws:
java.io.IOException

readShort

public short readShort()
                throws java.io.IOException
Specified by:
readShort in interface java.io.DataInput
Throws:
java.io.IOException

readUTF

public java.lang.String readUTF()
                         throws java.io.IOException
Specified by:
readUTF in interface java.io.DataInput
Throws:
java.io.IOException

skipBytes

public int skipBytes(int count)
              throws java.io.IOException
Specified by:
skipBytes in interface java.io.DataInput
Throws:
java.io.IOException

writeBoolean

public void writeBoolean(boolean value)
                  throws java.io.IOException
Specified by:
writeBoolean in interface java.io.DataOutput
Throws:
java.io.IOException

writeShort

public void writeShort(int value)
                throws java.io.IOException
Specified by:
writeShort in interface java.io.DataOutput
Throws:
java.io.IOException

writeChar

public void writeChar(int value)
               throws java.io.IOException
Specified by:
writeChar in interface java.io.DataOutput
Throws:
java.io.IOException

writeByte

public void writeByte(int value)
               throws java.io.IOException
Specified by:
writeByte in interface java.io.DataOutput
Throws:
java.io.IOException

writeBytes

public void writeBytes(java.lang.String byteString)
                throws java.io.IOException
Specified by:
writeBytes in interface java.io.DataOutput
Throws:
java.io.IOException

writeChars

public void writeChars(java.lang.String byteString)
                throws java.io.IOException
Specified by:
writeChars in interface java.io.DataOutput
Throws:
java.io.IOException

writeDouble

public void writeDouble(double value)
                 throws java.io.IOException
Specified by:
writeDouble in interface java.io.DataOutput
Throws:
java.io.IOException

writeFloat

public void writeFloat(float value)
                throws java.io.IOException
Specified by:
writeFloat in interface java.io.DataOutput
Throws:
java.io.IOException

writeInt

public void writeInt(int value)
              throws java.io.IOException
Specified by:
writeInt in interface java.io.DataOutput
Throws:
java.io.IOException

writeLong

public void writeLong(long value)
               throws java.io.IOException
Specified by:
writeLong in interface java.io.DataOutput
Throws:
java.io.IOException

writeUTF

public void writeUTF(java.lang.String value)
              throws java.io.IOException
Specified by:
writeUTF in interface java.io.DataOutput
Throws:
java.io.IOException