org.herac.tuxguitar.io.gtp
Class GTPInputStream

java.lang.Object
  extended by org.herac.tuxguitar.io.gtp.GTPInputStream
Direct Known Subclasses:
GP1InputStream, GP2InputStream, GP3InputStream, GP4InputStream, GP5InputStream

public abstract class GTPInputStream
extends java.lang.Object


Constructor Summary
GTPInputStream(java.lang.String[] versions)
           
 
Method Summary
protected  void close()
           
protected  TGFactory getFactory()
           
protected  java.lang.String getVersion()
           
protected  int getVersionIndex()
           
 void init(TGFactory factory, java.io.InputStream stream)
           
 boolean isSupportedVersion()
           
 boolean isSupportedVersion(java.lang.String version)
           
protected  int read()
           
protected  int read(byte[] bytes)
           
protected  int read(byte[] bytes, int off, int len)
           
protected  boolean readBoolean()
           
protected  byte readByte()
           
protected  int readInt()
           
protected  long readLong()
           
protected  java.lang.String readString(int length)
           
protected  java.lang.String readString(int size, int len)
           
protected  java.lang.String readStringByte(int size)
           
protected  java.lang.String readStringByteSizeOfByte()
           
protected  java.lang.String readStringByteSizeOfInteger()
           
protected  java.lang.String readStringInteger()
           
protected  int readUnsignedByte()
           
protected  void readVersion()
           
protected  void skip(int bytes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GTPInputStream

public GTPInputStream(java.lang.String[] versions)
Method Detail

init

public void init(TGFactory factory,
                 java.io.InputStream stream)

getVersion

protected java.lang.String getVersion()

getVersionIndex

protected int getVersionIndex()

getFactory

protected TGFactory getFactory()

isSupportedVersion

public boolean isSupportedVersion(java.lang.String version)

isSupportedVersion

public boolean isSupportedVersion()

readVersion

protected void readVersion()

read

protected int read()
            throws java.io.IOException
Throws:
java.io.IOException

read

protected int read(byte[] bytes)
            throws java.io.IOException
Throws:
java.io.IOException

read

protected int read(byte[] bytes,
                   int off,
                   int len)
            throws java.io.IOException
Throws:
java.io.IOException

skip

protected void skip(int bytes)
             throws java.io.IOException
Throws:
java.io.IOException

readUnsignedByte

protected int readUnsignedByte()
                        throws java.io.IOException
Throws:
java.io.IOException

readByte

protected byte readByte()
                 throws java.io.IOException
Throws:
java.io.IOException

readBoolean

protected boolean readBoolean()
                       throws java.io.IOException
Throws:
java.io.IOException

readInt

protected int readInt()
               throws java.io.IOException
Throws:
java.io.IOException

readLong

protected long readLong()
                 throws java.io.IOException
Throws:
java.io.IOException

readString

protected java.lang.String readString(int size,
                                      int len)
                               throws java.io.IOException
Throws:
java.io.IOException

readString

protected java.lang.String readString(int length)
                               throws java.io.IOException
Throws:
java.io.IOException

readStringInteger

protected java.lang.String readStringInteger()
                                      throws java.io.IOException
Throws:
java.io.IOException

readStringByte

protected java.lang.String readStringByte(int size)
                                   throws java.io.IOException
Throws:
java.io.IOException

readStringByteSizeOfByte

protected java.lang.String readStringByteSizeOfByte()
                                             throws java.io.IOException
Throws:
java.io.IOException

readStringByteSizeOfInteger

protected java.lang.String readStringByteSizeOfInteger()
                                                throws java.io.IOException
Throws:
java.io.IOException

close

protected void close()
              throws java.io.IOException
Throws:
java.io.IOException