|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.harvard.hul.ois.jhove.module.jpeg2000.MarkerSegment
public abstract class MarkerSegment
Abstract superclass for marker segments.
Field Summary | |
---|---|
protected ContCodestream |
_ccs
|
protected Codestream |
_cs
|
protected java.io.DataInputStream |
_dstream
|
protected Jpeg2000Module |
_module
|
protected RepInfo |
_repInfo
|
protected static int |
COC
|
protected static int |
COD
|
protected static int |
COM
|
protected static int |
CRG
|
protected static int |
EOC
|
protected static int |
EPH
|
protected static int |
PLM
|
protected static int |
PLT
|
protected static int |
POC
|
protected static int |
PPM
|
protected static int |
PPT
|
protected static int |
QCC
|
protected static int |
QCD
|
protected static int |
RGN
|
protected static int |
SIZ
|
protected static int |
SOC
|
protected static int |
SOD
|
protected static int |
SOP
|
protected static int |
SOT
|
protected static int |
TLM
|
Constructor Summary | |
---|---|
MarkerSegment()
Constructor. |
Method Summary | |
---|---|
protected MainOrTile |
getMainOrTile()
Returns the MainOrTile object which is currently applicable in the Contiguous Codestream. |
boolean |
isMarker()
Returns true if this segment is a Marker. |
protected static MarkerSegment |
markerSegmentMaker(int markerCode)
Static factory method for generating an object of the appropriate subclass of MarkerSegment, based on the marker code. |
protected int |
nCompBytes()
Determines size of fields indexed by number of components. |
protected abstract boolean |
process(int bytesToEat)
Process the marker or marker segment. |
protected int |
readMarkLen()
Reads and returns the length field of the marker segment. |
void |
setCodestream(Codestream cs)
Sets the Codestream object being built. |
void |
setContCodestream(ContCodestream ccs)
Sets the Continuous Codestream from which this marker was obtained. |
void |
setDataInputStream(java.io.DataInputStream dstream)
Sets the DataInputStream over which this marker is being read. |
void |
setModule(Jpeg2000Module module)
Sets the Module under which all this is happening. |
void |
setRepInfo(RepInfo repInfo)
Sets the RepInfo into which messages may be placed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int SOC
protected static final int COD
protected static final int COC
protected static final int TLM
protected static final int PLM
protected static final int PLT
protected static final int QCD
protected static final int QCC
protected static final int RGN
protected static final int POC
protected static final int PPM
protected static final int PPT
protected static final int CRG
protected static final int COM
protected static final int SOT
protected static final int SOP
protected static final int EPH
protected static final int SOD
protected static final int EOC
protected static final int SIZ
protected ContCodestream _ccs
protected Codestream _cs
protected Jpeg2000Module _module
protected java.io.DataInputStream _dstream
protected RepInfo _repInfo
Constructor Detail |
---|
public MarkerSegment()
setContCodestream
,
setCodestream
, setModule
,
and setDataInputStream
must all be called as
part of the setup before process
is called.
Method Detail |
---|
public void setContCodestream(ContCodestream ccs)
public void setCodestream(Codestream cs)
public void setModule(Jpeg2000Module module)
public void setDataInputStream(java.io.DataInputStream dstream)
public void setRepInfo(RepInfo repInfo)
public boolean isMarker()
true
if this segment is a Marker.
Will return false
unless overridden.
protected static MarkerSegment markerSegmentMaker(int markerCode)
markerCode
- The 8-bit marker code (ignoring the FF).protected int readMarkLen() throws java.io.IOException
setModule
and setDataInputStream
must be called as
part of the setup before readMarkLen
is called.
java.io.IOException
protected int nCompBytes()
protected MainOrTile getMainOrTile()
protected abstract boolean process(int bytesToEat) throws java.io.IOException
process
method must consume exactly the number
of bytes remaining in the marker segment; for a marker,
this number will always be 0.
bytesToEat
- The number of bytes that must be consumed.
For a Marker, this number will always be 0.
If it is 0 for a MarkerSegment, the
number of bytes to consume is unknown.
true
if segment is well-formed,
false
otherwise.
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |