Class SegmentHeader
- java.lang.Object
-
- org.apache.commons.compress.harmony.unpack200.SegmentHeader
-
public class SegmentHeader extends java.lang.Object
SegmentHeader is the header band of aSegment
-
-
Constructor Summary
Constructors Constructor Description SegmentHeader(Segment segment)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetArchiveModtime()longgetArchiveSize()intgetArchiveSizeOffset()intgetAttributeDefinitionCount()java.io.InputStreamgetBandHeadersInputStream()Obtain the band headers data as an input stream.intgetBandHeadersSize()intgetClassCount()intgetCpClassCount()intgetCpDescriptorCount()intgetCpDoubleCount()intgetCpFieldCount()intgetCpFloatCount()intgetCpIMethodCount()intgetCpIntCount()intgetCpLongCount()intgetCpMethodCount()intgetCpSignatureCount()intgetCpStringCount()intgetCpUTF8Count()intgetDefaultClassMajorVersion()intgetDefaultClassMinorVersion()intgetInnerClassCount()intgetNumberOfFiles()SegmentOptionsgetOptions()intgetSegmentsRemaining()voidread(java.io.InputStream in)voidsetArchiveModtime(long archiveModtime)voidsetArchiveSize(long archiveSize)voidsetSegmentsRemaining(long value)voidunpack()
-
-
-
Constructor Detail
-
SegmentHeader
public SegmentHeader(Segment segment)
-
-
Method Detail
-
getArchiveModtime
public long getArchiveModtime()
-
getArchiveSize
public long getArchiveSize()
-
getArchiveSizeOffset
public int getArchiveSizeOffset()
-
getAttributeDefinitionCount
public int getAttributeDefinitionCount()
-
getBandHeadersInputStream
public java.io.InputStream getBandHeadersInputStream()
Obtain the band headers data as an input stream. If no band headers are present, this will return an empty input stream to prevent any further reads taking place. Note that as a stream, data consumed from this input stream can't be re-used. Data is only read from this stream if the encoding is such that additional information needs to be decoded from the stream itself.- Returns:
- the band headers input stream
-
getBandHeadersSize
public int getBandHeadersSize()
-
getClassCount
public int getClassCount()
-
getCpClassCount
public int getCpClassCount()
-
getCpDescriptorCount
public int getCpDescriptorCount()
-
getCpDoubleCount
public int getCpDoubleCount()
-
getCpFieldCount
public int getCpFieldCount()
-
getCpFloatCount
public int getCpFloatCount()
-
getCpIMethodCount
public int getCpIMethodCount()
-
getCpIntCount
public int getCpIntCount()
-
getCpLongCount
public int getCpLongCount()
-
getCpMethodCount
public int getCpMethodCount()
-
getCpSignatureCount
public int getCpSignatureCount()
-
getCpStringCount
public int getCpStringCount()
-
getCpUTF8Count
public int getCpUTF8Count()
-
getDefaultClassMajorVersion
public int getDefaultClassMajorVersion()
-
getDefaultClassMinorVersion
public int getDefaultClassMinorVersion()
-
getInnerClassCount
public int getInnerClassCount()
-
getNumberOfFiles
public int getNumberOfFiles()
-
getOptions
public SegmentOptions getOptions()
-
getSegmentsRemaining
public int getSegmentsRemaining()
-
read
public void read(java.io.InputStream in) throws java.io.IOException, java.lang.Error, Pack200Exception
- Throws:
java.io.IOExceptionjava.lang.ErrorPack200Exception
-
setArchiveModtime
public void setArchiveModtime(long archiveModtime)
-
setArchiveSize
public void setArchiveSize(long archiveSize)
-
setSegmentsRemaining
public void setSegmentsRemaining(long value)
-
unpack
public void unpack()
-
-