org.aspectj.weaver
Class VersionedDataInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by java.io.DataInputStream
              extended by org.aspectj.weaver.VersionedDataInputStream
All Implemented Interfaces:
java.io.Closeable, java.io.DataInput

public class VersionedDataInputStream
extends java.io.DataInputStream

Lightweight subclass of DataInputStream that knows what version of the weaver was used to construct the data in it. The input stream has a constant pool reader attached which enables it to decode constant pool references found within the data being read.


Field Summary
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
VersionedDataInputStream(java.io.InputStream is, ConstantPoolReader constantPoolReader)
           
 
Method Summary
 boolean canDecompress()
           
 long getBuildstamp()
           
 int getMajorVersion()
           
 int getMinorVersion()
           
 boolean isAtLeast169()
           
 java.lang.String readPath()
           
 java.lang.String readSignature()
           
 UnresolvedType readSignatureAsUnresolvedType()
           
 java.lang.String readUtf8(int cpIndex)
           
 void setVersion(AjAttribute.WeaverVersionInfo version)
           
 java.lang.String toString()
           
 
Methods inherited from class java.io.DataInputStream
read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, readUTF, skipBytes
 
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VersionedDataInputStream

public VersionedDataInputStream(java.io.InputStream is,
                                ConstantPoolReader constantPoolReader)
Method Detail

getMajorVersion

public int getMajorVersion()

getMinorVersion

public int getMinorVersion()

getBuildstamp

public long getBuildstamp()

setVersion

public void setVersion(AjAttribute.WeaverVersionInfo version)

readUtf8

public java.lang.String readUtf8(int cpIndex)

canDecompress

public boolean canDecompress()

isAtLeast169

public boolean isAtLeast169()

readPath

public java.lang.String readPath()
                          throws java.io.IOException
Throws:
java.io.IOException

readSignature

public java.lang.String readSignature()
                               throws java.io.IOException
Throws:
java.io.IOException

readSignatureAsUnresolvedType

public UnresolvedType readSignatureAsUnresolvedType()
                                             throws java.io.IOException
Throws:
java.io.IOException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object