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
-
getArchiveSizeOffset
public int getArchiveSizeOffset()
-
read
public void read(java.io.InputStream in) throws java.io.IOException, Pack200Exception, java.lang.Error, Pack200Exception
- Throws:
java.io.IOExceptionPack200Exceptionjava.lang.Error
-
unpack
public void unpack()
-
getArchiveModtime
public long getArchiveModtime()
-
getAttributeDefinitionCount
public int getAttributeDefinitionCount()
-
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()
-
getArchiveSize
public long getArchiveSize()
-
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
-
getNumberOfFiles
public int getNumberOfFiles()
-
getSegmentsRemaining
public int getSegmentsRemaining()
-
getOptions
public SegmentOptions getOptions()
-
setArchiveModtime
public void setArchiveModtime(long archiveModtime)
-
setArchiveSize
public void setArchiveSize(long archiveSize)
-
setSegmentsRemaining
public void setSegmentsRemaining(long value)
-
getBandHeadersSize
public int getBandHeadersSize()
-
-