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 long
getArchiveModtime()
long
getArchiveSize()
int
getArchiveSizeOffset()
int
getAttributeDefinitionCount()
java.io.InputStream
getBandHeadersInputStream()
Obtain the band headers data as an input stream.int
getBandHeadersSize()
int
getClassCount()
int
getCpClassCount()
int
getCpDescriptorCount()
int
getCpDoubleCount()
int
getCpFieldCount()
int
getCpFloatCount()
int
getCpIMethodCount()
int
getCpIntCount()
int
getCpLongCount()
int
getCpMethodCount()
int
getCpSignatureCount()
int
getCpStringCount()
int
getCpUTF8Count()
int
getDefaultClassMajorVersion()
int
getDefaultClassMinorVersion()
int
getInnerClassCount()
int
getNumberOfFiles()
SegmentOptions
getOptions()
int
getSegmentsRemaining()
void
read(java.io.InputStream in)
void
setArchiveModtime(long archiveModtime)
void
setArchiveSize(long archiveSize)
void
setSegmentsRemaining(long value)
void
unpack()
-
-
-
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.IOException
Pack200Exception
java.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()
-
-