Top Description Fields Constructors Methods
org.apache.commons.compress.harmony.unpack200

public Class CpBands

extends BandSet
Class Inheritance
Imports
java.io.IOException, .InputStream, java.util.ArrayList, .Arrays, .HashMap, .Map, org.apache.commons.compress.harmony.pack200.Codec, .Pack200Exception, org.apache.commons.compress.harmony.unpack200.bytecode.CPClass, .CPDouble, .CPFieldRef, .CPFloat, .CPInteger, .CPInterfaceMethodRef, .CPLong, .CPMethodRef, .CPNameAndType, .CPString, .CPUTF8

Constant Pool bands

Field Summary

Modifier and TypeField and Description
private int
private 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 int
private int
private final Map<Double, CPDouble>
private static final String
private int
private int
private final Map<Float, CPFloat>
private int
private final Map<Integer, CPInteger>
private int
private int
private final Map<Long, CPLong>
private Map<String, Integer>
private Map<String, Integer>
private Map<String, Integer>
private Map<String, Integer>
private int
private final SegmentConstantPool
private int
private int
private final Map<String, CPClass>
private final Map<String, CPString>
private final Map<String, CPUTF8>
Inherited from org.apache.commons.compress.harmony.unpack200.BandSet:
headersegment

Constructor Summary

AccessConstructor and Description
public
CpBands(final Segment segment)

Method Summary

Modifier and TypeMethod and Description
public CPClass
cpClassValue(final int index)

public CPClass
cpClassValue(final String string)

public CPDouble
cpDoubleValue(final int index)

public CPFieldRef
cpFieldValue(final int index)

public CPFloat
cpFloatValue(final int index)

public CPInterfaceMethodRef
cpIMethodValue(final int index)

public CPInteger
cpIntegerValue(final int index)

public CPLong
cpLongValue(final int index)

public CPMethodRef
cpMethodValue(final int index)

public CPNameAndType
cpNameAndTypeValue(final int index)

public CPNameAndType
cpNameAndTypeValue(final String descriptor)

public CPUTF8
cpSignatureValue(final int index)

public CPString
cpStringValue(final int index)

public CPUTF8
cpUTF8Value(final int index)

public CPUTF8
cpUTF8Value(final String string)

public CPUTF8
cpUTF8Value(final String string, final boolean searchForIndex)

public SegmentConstantPool
public String[]
public String[]
public int[]
public int[]
public String[]
public String[]
public int[]
public long[]
public String[]
public String[]
public String[]
public String[]
private void
parseCpClass(final InputStream
the input stream to read from
in
)

Parses the constant pool class names, using cpClassCount to populate cpClass from cpUTF8.

private void
parseCpDescriptor(final InputStream
the input stream to read from
in
)

Parses the constant pool descriptor definitions, using cpDescriptorCount to populate cpDescriptor.

private void
private void
parseCpField(final InputStream
the input stream to read from
in
)

Parses the constant pool field definitions, using cpFieldCount to populate cpFieldClass and cpFieldDescriptor.

private void
private void
parseCpIMethod(final InputStream
the input stream to read from
in
)

Parses the constant pool interface method definitions, using cpIMethodCount to populate cpIMethodClass and cpIMethodDescriptor.

private void
private void
private void
parseCpMethod(final InputStream
the input stream to read from
in
)

Parses the constant pool method definitions, using cpMethodCount to populate cpMethodClass and cpMethodDescriptor.

private void
parseCpSignature(final InputStream
the input stream to read from
in
)

Parses the constant pool signature classes, using cpSignatureCount to populate cpSignature.

private void
parseCpString(final InputStream
the input stream to read from
in
)

Parses the constant pool strings, using cpStringCount to populate cpString from indexes into cpUTF8.

private void
public void
public void
Inherited from org.apache.commons.compress.harmony.unpack200.BandSet:
decodeBandIntdecodeBandIntgetReferencesgetReferencesparseCPClassReferencesparseCPDescriptorReferencesparseCPDoubleReferencesparseCPFieldRefReferencesparseCPFloatReferencesparseCPInterfaceMethodRefReferencesparseCPIntReferencesparseCPLongReferencesparseCPMethodRefReferencesparseCPSignatureReferencesparseCPSignatureReferencesparseCPStringReferencesparseCPUTF8ReferencesparseCPUTF8ReferencesparseFlagsparseFlagsparseFlagsparseFlagsparseReferencesparseReferencesunpack

Field Detail

classOffsetback to summary
private int classOffset
cpClassback to summary
private String[] cpClass
cpClassIntsback to summary
private int[] cpClassInts
cpDescriptorback to summary
private String[] cpDescriptor
cpDescriptorNameIntsback to summary
private int[] cpDescriptorNameInts
cpDescriptorTypeIntsback to summary
private int[] cpDescriptorTypeInts
cpDoubleback to summary
private double[] cpDouble
cpFieldClassback to summary
private String[] cpFieldClass
cpFieldClassIntsback to summary
private int[] cpFieldClassInts
cpFieldDescriptorback to summary
private String[] cpFieldDescriptor
cpFieldDescriptorIntsback to summary
private int[] cpFieldDescriptorInts
cpFloatback to summary
private float[] cpFloat
cpIMethodClassback to summary
private String[] cpIMethodClass
cpIMethodClassIntsback to summary
private int[] cpIMethodClassInts
cpIMethodDescriptorback to summary
private String[] cpIMethodDescriptor
cpIMethodDescriptorIntsback to summary
private int[] cpIMethodDescriptorInts
cpIntback to summary
private int[] cpInt
cpLongback to summary
private long[] cpLong
cpMethodClassback to summary
private String[] cpMethodClass
cpMethodClassIntsback to summary
private int[] cpMethodClassInts
cpMethodDescriptorback to summary
private String[] cpMethodDescriptor
cpMethodDescriptorIntsback to summary
private int[] cpMethodDescriptorInts
cpSignatureback to summary
private String[] cpSignature
cpSignatureIntsback to summary
private int[] cpSignatureInts
cpStringback to summary
private String[] cpString
cpStringIntsback to summary
private int[] cpStringInts
cpUTF8back to summary
private String[] cpUTF8
descriptorsToCPNameAndTypesback to summary
private final Map<String, CPNameAndType> descriptorsToCPNameAndTypes
descrOffsetback to summary
private int descrOffset
doubleOffsetback to summary
private int doubleOffset
doublesToCPDoublesback to summary
private final Map<Double, CPDouble> doublesToCPDoubles
EMPTY_STRINGback to summary
private static final String EMPTY_STRING
fieldOffsetback to summary
private int fieldOffset
floatOffsetback to summary
private int floatOffset
floatsToCPFloatsback to summary
private final Map<Float, CPFloat> floatsToCPFloats
imethodOffsetback to summary
private int imethodOffset
integersToCPIntegersback to summary
private final Map<Integer, CPInteger> integersToCPIntegers
intOffsetback to summary
private int intOffset
longOffsetback to summary
private int longOffset
longsToCPLongsback to summary
private final Map<Long, CPLong> longsToCPLongs
mapClassback to summary
private Map<String, Integer> mapClass
mapDescriptorback to summary
private Map<String, Integer> mapDescriptor
mapSignatureback to summary
private Map<String, Integer> mapSignature
mapUTF8back to summary
private Map<String, Integer> mapUTF8
methodOffsetback to summary
private int methodOffset
poolback to summary
private final SegmentConstantPool pool
signatureOffsetback to summary
private int signatureOffset
stringOffsetback to summary
private int stringOffset
stringsToCPClassback to summary
private final Map<String, CPClass> stringsToCPClass
stringsToCPStringsback to summary
private final Map<String, CPString> stringsToCPStrings
stringsToCPUTF8back to summary
private final Map<String, CPUTF8> stringsToCPUTF8

Constructor Detail

CpBandsback to summary
public CpBands(final Segment segment)

Method Detail

cpClassValueback to summary
public CPClass cpClassValue(final int index)
cpClassValueback to summary
public CPClass cpClassValue(final String string)
cpDoubleValueback to summary
public CPDouble cpDoubleValue(final int index)
cpFieldValueback to summary
public CPFieldRef cpFieldValue(final int index)
cpFloatValueback to summary
public CPFloat cpFloatValue(final int index)
cpIMethodValueback to summary
public CPInterfaceMethodRef cpIMethodValue(final int index)
cpIntegerValueback to summary
public CPInteger cpIntegerValue(final int index)
cpLongValueback to summary
public CPLong cpLongValue(final int index)
cpMethodValueback to summary
public CPMethodRef cpMethodValue(final int index)
cpNameAndTypeValueback to summary
public CPNameAndType cpNameAndTypeValue(final int index)
cpNameAndTypeValueback to summary
public CPNameAndType cpNameAndTypeValue(final String descriptor)
cpSignatureValueback to summary
public CPUTF8 cpSignatureValue(final int index)
cpStringValueback to summary
public CPString cpStringValue(final int index)
cpUTF8Valueback to summary
public CPUTF8 cpUTF8Value(final int index)
cpUTF8Valueback to summary
public CPUTF8 cpUTF8Value(final String string)
cpUTF8Valueback to summary
public CPUTF8 cpUTF8Value(final String string, final boolean searchForIndex)
getConstantPoolback to summary
public SegmentConstantPool getConstantPool()
getCpClassback to summary
public String[] getCpClass()
getCpDescriptorback to summary
public String[] getCpDescriptor()
getCpDescriptorNameIntsback to summary
public int[] getCpDescriptorNameInts()
getCpDescriptorTypeIntsback to summary
public int[] getCpDescriptorTypeInts()
getCpFieldClassback to summary
public String[] getCpFieldClass()
getCpIMethodClassback to summary
public String[] getCpIMethodClass()
getCpIntback to summary
public int[] getCpInt()
getCpLongback to summary
public long[] getCpLong()
getCpMethodClassback to summary
public String[] getCpMethodClass()
getCpMethodDescriptorback to summary
public String[] getCpMethodDescriptor()
getCpSignatureback to summary
public String[] getCpSignature()
getCpUTF8back to summary
public String[] getCpUTF8()
parseCpClassback to summary
private void parseCpClass(final InputStream in) throws IOException, Pack200Exception

Parses the constant pool class names, using cpClassCount to populate cpClass from cpUTF8.

Parameters
in:InputStream

the input stream to read from

Exceptions
IOException:
if a problem occurs during reading from the underlying stream
Pack200Exception:
if a problem occurs with an unexpected value or unsupported codec
parseCpDescriptorback to summary
private void parseCpDescriptor(final InputStream in) throws IOException, Pack200Exception

Parses the constant pool descriptor definitions, using cpDescriptorCount to populate cpDescriptor. 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 (e.g. out:java.lang.PrintStream) in a way that is compatible with passing String arrays.

Parameters
in:InputStream

the input stream to read from

Exceptions
IOException:
if a problem occurs during reading from the underlying stream
Pack200Exception:
if a problem occurs with an unexpected value or unsupported codec
parseCpDoubleback to summary
private void parseCpDouble(final InputStream in) throws IOException, Pack200Exception
parseCpFieldback to summary
private void parseCpField(final InputStream in) throws IOException, Pack200Exception

Parses the constant pool field definitions, using cpFieldCount to populate cpFieldClass and cpFieldDescriptor.

Parameters
in:InputStream

the input stream to read from

Exceptions
IOException:
if a problem occurs during reading from the underlying stream
Pack200Exception:
if a problem occurs with an unexpected value or unsupported codec
parseCpFloatback to summary
private void parseCpFloat(final InputStream in) throws IOException, Pack200Exception
parseCpIMethodback to summary
private void parseCpIMethod(final InputStream in) throws IOException, Pack200Exception

Parses the constant pool interface method definitions, using cpIMethodCount to populate cpIMethodClass and cpIMethodDescriptor.

Parameters
in:InputStream

the input stream to read from

Exceptions
IOException:
if a problem occurs during reading from the underlying stream
Pack200Exception:
if a problem occurs with an unexpected value or unsupported codec
parseCpIntback to summary
private void parseCpInt(final InputStream in) throws IOException, Pack200Exception
parseCpLongback to summary
private void parseCpLong(final InputStream in) throws IOException, Pack200Exception
parseCpMethodback to summary
private void parseCpMethod(final InputStream in) throws IOException, Pack200Exception

Parses the constant pool method definitions, using cpMethodCount to populate cpMethodClass and cpMethodDescriptor.

Parameters
in:InputStream

the input stream to read from

Exceptions
IOException:
if a problem occurs during reading from the underlying stream
Pack200Exception:
if a problem occurs with an unexpected value or unsupported codec
parseCpSignatureback to summary
private void parseCpSignature(final InputStream in) throws IOException, Pack200Exception

Parses the constant pool signature classes, using cpSignatureCount to populate cpSignature. 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 to public static void main(String args[]) has a form of [L(V) and a classes array of [java.lang.String]. The cpSignature is a string representation identical to the bytecode equivalent [Ljava/lang/String;(V) TODO Check that the form is as above and update other types e.g. J

Parameters
in:InputStream

the input stream to read from

Exceptions
IOException:
if a problem occurs during reading from the underlying stream
Pack200Exception:
if a problem occurs with an unexpected value or unsupported codec
parseCpStringback to summary
private void parseCpString(final InputStream in) throws IOException, Pack200Exception

Parses the constant pool strings, using cpStringCount to populate cpString from indexes into cpUTF8.

Parameters
in:InputStream

the input stream to read from

Exceptions
IOException:
if a problem occurs during reading from the underlying stream
Pack200Exception:
if a problem occurs with an unexpected value or unsupported codec
parseCpUtf8back to summary
private void parseCpUtf8(final InputStream in) throws IOException, Pack200Exception
readback to summary
public void read(final InputStream in) throws IOException, Pack200Exception

Implements abstract org.apache.commons.compress.harmony.unpack200.BandSet.read.

Annotations
@Override
unpackback to summary
public void unpack()

Implements abstract org.apache.commons.compress.harmony.unpack200.BandSet.unpack.

Annotations
@Override