com.vwp.sound.mod.util.io
Class AbstractRandomAccess

java.lang.Object
  extended by com.vwp.sound.mod.util.io.AbstractRandomAccess
All Implemented Interfaces:
RandomAccess
Direct Known Subclasses:
RandomAccessArray, RandomAccessFile

public abstract class AbstractRandomAccess
extends java.lang.Object
implements RandomAccess


Constructor Summary
AbstractRandomAccess()
           
 
Method Summary
 java.lang.String readString(int len)
           
 int readUnsignedInt()
           
 int readUnsignedShort()
           
 java.lang.String readZeroPaddedString(int maxLen)
          read a string field of maximum maxLen characters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.vwp.sound.mod.util.io.RandomAccess
close, getPosition, read, readByte, readInt, readShort, readUnsignedByte, seek, skipBytes
 

Constructor Detail

AbstractRandomAccess

public AbstractRandomAccess()
Method Detail

readString

public java.lang.String readString(int len)
                            throws java.io.IOException
Specified by:
readString in interface RandomAccess
Throws:
java.io.IOException

readZeroPaddedString

public java.lang.String readZeroPaddedString(int maxLen)
                                      throws java.io.IOException
Description copied from interface: RandomAccess
read a string field of maximum maxLen characters. The string may be shorter, and is then assumed to be padded with zeros. Only the non-zero part is returned, but the position will always be moved maxLen bytes forward.

Specified by:
readZeroPaddedString in interface RandomAccess
Returns:
Throws:
java.io.IOException

readUnsignedShort

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

readUnsignedInt

public int readUnsignedInt()
                    throws java.io.IOException
Specified by:
readUnsignedInt in interface RandomAccess
Throws:
java.io.IOException