|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectCADI.Common.LogicalTarget.JPEG2000.Codestream.PacketHeaderDataInputStream
public class PacketHeaderDataInputStream
This class implements a data input read to be read from the packet headers
decoder. It abstracts from reading and discarting the 0xFF bytes which can
be found in the packet header stream. Therefore, each call to the
getTagBit() method returns a valid bit.
| Field Summary | |
|---|---|
private BufferedDataInputStream |
bufferedDataInputStream
|
private boolean |
foundFF
Boolean that indicates if a 0xFF has been found in the bytestream. |
private byte |
nextByte
Variable used by the getTagBit function, needed to get bit by bit the packet data. |
private int |
numBit
Variable used by the getTagBit function, needed to get bit by bit the data input stream Only positive values allowed. |
private byte |
readByte
Variable used by the getTagBit function, needed to get bit by bit the packet data. |
| Constructor Summary | |
|---|---|
PacketHeaderDataInputStream()
Constructor. |
|
PacketHeaderDataInputStream(BufferedDataInputStream bufferedDataInputStream)
Constructor |
|
| Method Summary | |
|---|---|
int |
getTagBit()
Retrieves a bit from the file. |
void |
list(java.io.PrintStream out)
Prints this Packet Header Data Output Stream out to the specified output stream. |
void |
resetGetTagBit()
Reset the getTagBit flags to reinitialize the reading. |
void |
setInput(BufferedDataInputStream bufferedDataInputStream)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private BufferedDataInputStream bufferedDataInputStream
private int numBit
Only positive values allowed.
private boolean foundFF
True indicates that a 0xFF byte has been found.
private byte readByte
Byte from the packet data.
private byte nextByte
Byte from the packet data.
| Constructor Detail |
|---|
public PacketHeaderDataInputStream()
public PacketHeaderDataInputStream(BufferedDataInputStream bufferedDataInputStream)
bufferedDataInputStream - | Method Detail |
|---|
public void setInput(BufferedDataInputStream bufferedDataInputStream)
bufferedDataInputStream -
public int getTagBit()
throws java.io.EOFException,
java.io.IOException
java.io.EOFException - when end of file is reached
java.io.IOException - if an I/O error occurspublic void resetGetTagBit()
public java.lang.String toString()
toString in class java.lang.Objectpublic void list(java.io.PrintStream out)
out - an output stream.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||