|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectCADI.Common.LogicalTarget.JPEG2000.Codestream.PacketHeadersDecoder
public class PacketHeadersDecoder
This class performs the packet header decoding.
Usage: example:
| Field Summary | |
|---|---|
private boolean |
EPH
Indicates whether the End of Packet marker is in the codestream and it must be read. |
private int[][][] |
firstLayer
Definition in PacketHeaderDataDecoder.firstLayer. |
private int[][][][][][] |
imageStructure
Is the image structure. |
private int[][][] |
lBlock
Definition in PacketHeaderDataDecoder.lBlock. |
private int |
Nsop
Packet sequence number. |
private int |
NsopInHeader
|
private java.util.Hashtable<java.lang.Long,PacketHeaderDataDecoder> |
packetHeaders
This object is used to save the packet headers data objects. |
private PacketHeaderDataInputStream |
PHDataInputStream
Is a input stream where bits of packet headers will be read from. |
private boolean |
SOP
Indicates whether the Start of Packet marker is in the codestream and it must be read. |
private TagTreeDecoder[] |
TTInclusionInformation
Definition in PacketHeaderDataDecoder.TTInclusionInformation. |
private TagTreeDecoder[] |
TTZeroBitPlanes
Definition in PacketHeaderDataDecoder.TTZeroBitPlanes. |
private int[][][] |
zeroBitPlanes
|
| Constructor Summary | |
|---|---|
PacketHeadersDecoder(int[][][][][][] imageStructure)
Constructor. |
|
PacketHeadersDecoder(int[][][][][][] imageStructure,
boolean sop,
boolean eph)
Constructor. |
|
| Method Summary | |
|---|---|
private int |
DecodeCodingPasses()
Decodify the coding passes |
private int |
DecodeLblock()
Decodify the Lblock value |
private int[] |
DecodeLengths(int lblock,
int codingPasses)
Decodify the length of codeword segment |
private int |
getBit()
Returns the bit readed from the file. |
int[][][] |
getZeroBitPlanes(long inClassIdentifier)
Returns the zero bit planes for a tile-component-resolution-precinct. |
void |
list(java.io.PrintStream out)
Prints this Packet headers Decoder's fields to the specified output stream. |
int[][][][] |
packetHeaderDecoding(BufferedDataInputStream PHDataInputStream,
long inClassIdentifier,
int z,
int rLevel,
int precinct)
Decodes the packet header for a precinct of a given layer, z, rLevel, precinct |
private void |
readEPH(BufferedDataInputStream PHDataInputStream)
To read EPH marker if it is used |
private void |
readSOP(BufferedDataInputStream PHDataInputStream)
To position the file pointer just before the first PacketHeader |
void |
reset()
Sets the internal attributes (states) to its initial values. |
java.lang.String |
toString()
(non-Javadoc) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private int[][][][][][] imageStructure
private PacketHeaderDataInputStream PHDataInputStream
private boolean SOP
private boolean EPH
private java.util.Hashtable<java.lang.Long,PacketHeaderDataDecoder> packetHeaders
JPIPMessageHeader.inClassIdentifier)
as a key.
private TagTreeDecoder[] TTInclusionInformation
PacketHeaderDataDecoder.TTInclusionInformation.
private TagTreeDecoder[] TTZeroBitPlanes
PacketHeaderDataDecoder.TTZeroBitPlanes.
private int[][][] lBlock
PacketHeaderDataDecoder.lBlock.
private int[][][] firstLayer
PacketHeaderDataDecoder.firstLayer.
private int[][][] zeroBitPlanes
private int Nsop
Valid values between 0 to 65535.
private int NsopInHeader
| Constructor Detail |
|---|
public PacketHeadersDecoder(int[][][][][][] imageStructure)
This constructor assumes Start Of Packet (SOP) and End of Packet Headers (EPH) are not used.
imageStructure - definition in imageStructure
public PacketHeadersDecoder(int[][][][][][] imageStructure,
boolean sop,
boolean eph)
imageStructure - definition in imageStructuresop - definition in SOPeph - definition in EPH| Method Detail |
|---|
public void reset()
throws ErrorException
ErrorException - when the internal attributes cannot be reseted.
public int[][][][] packetHeaderDecoding(BufferedDataInputStream PHDataInputStream,
long inClassIdentifier,
int z,
int rLevel,
int precinct)
throws ErrorException,
java.io.EOFException,
java.io.IOException
PHDataInputStream - a input stream where packet header is read from.inClassIdentifier - definition in JPIPMessageHeader.inClassIdentifier.layer - Layerz - ComponentrLevel - Resolution levelprecinct - Precinct
ErrorException - when the packet header is corrupted
java.io.EOFException - if the end of the input stream has been reached.
java.io.IOException - if a I/O error has ocurred.
public int[][][] getZeroBitPlanes(long inClassIdentifier)
throws java.lang.IllegalAccessException
inClassIdentifier -
PacketHeaderDataDecoder.zeroBitPlanes
java.lang.IllegalAccessExceptionpublic java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public void list(java.io.PrintStream out)
out - an output stream.
private int DecodeLblock()
throws java.io.EOFException,
java.io.IOException
ErrorException - when the packet header is corrupted
java.io.EOFException
java.io.IOException
private int[] DecodeLengths(int lblock,
int codingPasses)
throws java.io.EOFException,
java.io.IOException
lblock - current valuecodingPasses - coding passes number of the codeblock
ErrorException - when the packet header is corrupted
java.io.EOFException
java.io.IOException
private int DecodeCodingPasses()
throws java.io.EOFException,
java.io.IOException
ErrorException - when the packet header is corrupted
java.io.EOFException
java.io.IOException
private void readSOP(BufferedDataInputStream PHDataInputStream)
throws ErrorException,
java.io.EOFException,
java.io.IOException
ErrorException - when the file cannot be load
java.io.EOFException
java.io.IOException
private void readEPH(BufferedDataInputStream PHDataInputStream)
throws ErrorException,
java.io.EOFException,
java.io.IOException
ErrorException - when the file cannot be load
java.io.EOFException
java.io.IOException
private int getBit()
throws java.io.EOFException,
java.io.IOException
java.io.EOFException
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||