Class CpBands
java.lang.Object
org.apache.commons.compress.harmony.unpack200.BandSet
org.apache.commons.compress.harmony.unpack200.CpBands
Constant Pool bands.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate String[]private int[]private String[]private int[]private int[]private double[]private String[]private int[]private String[]private int[]private float[]private String[]private int[]private String[]private int[]private int[]private long[]private String[]private int[]private String[]private int[]private String[]private int[]private String[]private int[]private String[]private final Map<String,CPNameAndType> private intprivate intprivate static final Stringprivate intprivate intprivate intprivate intprivate intprivate intprivate final SegmentConstantPoolprivate intprivate int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncpClassValue(int index) cpClassValue(String string) cpDoubleValue(int index) cpFieldValue(int index) cpFloatValue(int index) cpIMethodValue(int index) cpIntegerValue(int index) cpLongValue(int index) cpMethodValue(int index) cpNameAndTypeValue(int index) cpNameAndTypeValue(String descriptor) cpSignatureValue(int index) cpStringValue(int index) cpUTF8Value(int index) cpUTF8Value(String string) cpUTF8Value(String string, boolean searchForIndex) String[]String[]int[]int[]String[]String[]int[]getCpInt()long[]String[]String[]String[]String[]private voidprivate voidParses the constant pool descriptor definitions, using#cpDescriptorCountto populatecpDescriptor.private voidprivate voidParses the constant pool field definitions, using#cpFieldCountto populatecpFieldClassandcpFieldDescriptor.private voidprivate voidParses the constant pool interface method definitions, using#cpIMethodCountto populatecpIMethodClassandcpIMethodDescriptor.private voidprivate voidprivate voidParses the constant pool method definitions, using#cpMethodCountto populatecpMethodClassandcpMethodDescriptor.private voidParses the constant pool signature classes, using#cpSignatureCountto populatecpSignature.private voidprivate voidvoidread(InputStream in) Reads the input stream.voidunpack()Unpacks this instance.Methods inherited from class org.apache.commons.compress.harmony.unpack200.BandSet
decodeBandInt, decodeBandInt, getReferences, getReferences, parseCPClassReferences, parseCPDescriptorReferences, parseCPDoubleReferences, parseCPFieldRefReferences, parseCPFloatReferences, parseCPInterfaceMethodRefReferences, parseCPIntReferences, parseCPLongReferences, parseCPMethodRefReferences, parseCPSignatureReferences, parseCPSignatureReferences, parseCPStringReferences, parseCPUTF8References, parseCPUTF8References, parseFlags, parseFlags, parseFlags, parseFlags, parseReferences, parseReferences, unpack
-
Field Details
-
EMPTY_STRING
- See Also:
-
pool
-
cpClass
-
cpClassInts
private int[] cpClassInts -
cpDescriptorNameInts
private int[] cpDescriptorNameInts -
cpDescriptorTypeInts
private int[] cpDescriptorTypeInts -
cpDescriptor
-
cpDouble
private double[] cpDouble -
cpFieldClass
-
cpFieldDescriptor
-
cpFieldClassInts
private int[] cpFieldClassInts -
cpFieldDescriptorInts
private int[] cpFieldDescriptorInts -
cpFloat
private float[] cpFloat -
cpIMethodClass
-
cpIMethodDescriptor
-
cpIMethodClassInts
private int[] cpIMethodClassInts -
cpIMethodDescriptorInts
private int[] cpIMethodDescriptorInts -
cpInt
private int[] cpInt -
cpLong
private long[] cpLong -
cpMethodClass
-
cpMethodDescriptor
-
cpMethodClassInts
private int[] cpMethodClassInts -
cpMethodDescriptorInts
private int[] cpMethodDescriptorInts -
cpSignature
-
cpSignatureInts
private int[] cpSignatureInts -
cpString
-
cpStringInts
private int[] cpStringInts -
cpUTF8
-
stringsToCPUTF8
-
stringsToCPStrings
-
longsToCPLongs
-
integersToCPIntegers
-
floatsToCPFloats
-
stringsToCPClass
-
doublesToCPDoubles
-
descriptorsToCPNameAndTypes
-
mapClass
-
mapDescriptor
-
mapUTF8
-
mapSignature
-
intOffset
private int intOffset -
floatOffset
private int floatOffset -
longOffset
private int longOffset -
doubleOffset
private int doubleOffset -
stringOffset
private int stringOffset -
classOffset
private int classOffset -
signatureOffset
private int signatureOffset -
descrOffset
private int descrOffset -
fieldOffset
private int fieldOffset -
methodOffset
private int methodOffset -
imethodOffset
private int imethodOffset
-
-
Constructor Details
-
CpBands
-
-
Method Details
-
cpClassValue
-
cpClassValue
-
cpDoubleValue
-
cpFieldValue
-
cpFloatValue
-
cpIMethodValue
-
cpIntegerValue
-
cpLongValue
-
cpMethodValue
-
cpNameAndTypeValue
-
cpNameAndTypeValue
-
cpSignatureValue
-
cpStringValue
-
cpUTF8Value
-
cpUTF8Value
-
cpUTF8Value
-
getConstantPool
-
getCpClass
-
getCpDescriptor
-
getCpDescriptorNameInts
public int[] getCpDescriptorNameInts() -
getCpDescriptorTypeInts
public int[] getCpDescriptorTypeInts() -
getCpFieldClass
-
getCpIMethodClass
-
getCpInt
public int[] getCpInt() -
getCpLong
public long[] getCpLong() -
getCpMethodClass
-
getCpMethodDescriptor
-
getCpSignature
-
getCpUTF8
-
parseCpClass
- Parameters:
in- the input stream to read from- Throws:
IOException- if a problem occurs during reading from the underlying streamPack200Exception- if a problem occurs with an unexpected value or unsupported codec
-
parseCpDescriptor
Parses the constant pool descriptor definitions, using#cpDescriptorCountto populatecpDescriptor. For ease of use, the cpDescriptor is stored as a string of the form name:type, largely to make it easier for representing field and method descriptors (for exampleout:java.lang.PrintStream) in a way that is compatible with passing String arrays.- Parameters:
in- the input stream to read from- Throws:
IOException- if a problem occurs during reading from the underlying streamPack200Exception- if a problem occurs with an unexpected value or unsupported codec
-
parseCpDouble
- Throws:
IOExceptionPack200Exception
-
parseCpField
Parses the constant pool field definitions, using#cpFieldCountto populatecpFieldClassandcpFieldDescriptor.- Parameters:
in- the input stream to read from- Throws:
IOException- if a problem occurs during reading from the underlying streamPack200Exception- if a problem occurs with an unexpected value or unsupported codec
-
parseCpFloat
- Throws:
IOExceptionPack200Exception
-
parseCpIMethod
Parses the constant pool interface method definitions, using#cpIMethodCountto populatecpIMethodClassandcpIMethodDescriptor.- Parameters:
in- the input stream to read from- Throws:
IOException- if a problem occurs during reading from the underlying streamPack200Exception- if a problem occurs with an unexpected value or unsupported codec
-
parseCpInt
- Throws:
IOExceptionPack200Exception
-
parseCpLong
- Throws:
IOExceptionPack200Exception
-
parseCpMethod
Parses the constant pool method definitions, using#cpMethodCountto populatecpMethodClassandcpMethodDescriptor.- Parameters:
in- the input stream to read from- Throws:
IOException- if a problem occurs during reading from the underlying streamPack200Exception- if a problem occurs with an unexpected value or unsupported codec
-
parseCpSignature
Parses the constant pool signature classes, using#cpSignatureCountto populatecpSignature. A signature form is akin to the bytecode representation of a class; Z for boolean, I for int, [ for array etc. However, although classes are started with L, the class name does not follow the form; instead, there is a separate array of classes. So an array corresponding topublic static void main(String args[])has a form of[L(V)and a classes array of[java.lang.String]. ThecpSignatureis a string representation identical to the bytecode equivalent[Ljava/lang/String;(V)TODO Check that the form is as above and update other types for example J- Parameters:
in- the input stream to read from- Throws:
IOException- if a problem occurs during reading from the underlying streamPack200Exception- if a problem occurs with an unexpected value or unsupported codec
-
parseCpString
Parses the constant pool strings, using#cpStringCountto populatecpStringfrom indexes intocpUTF8.- Parameters:
in- the input stream to read from- Throws:
IOException- if a problem occurs during reading from the underlying streamPack200Exception- if a problem occurs with an unexpected value or unsupported codec
-
parseCpUtf8
- Throws:
IOExceptionPack200Exception
-
read
Description copied from class:BandSetReads the input stream.- Specified by:
readin classBandSet- Parameters:
in- the stream to read.- Throws:
IOException- if a problem occurs during reading from the underlying stream.Pack200Exception- if a problem occurs with an unexpected value or unsupported Codec.
-
unpack
public void unpack()Description copied from class:BandSetUnpacks this instance.
-