public class PacketHeaderDataInputStream
extends java.lang.Object
getTagBit()
method returns a valid bit.Modifier and Type | Field and Description |
---|---|
private BufferedDataInputStream |
bufferedDataInputStream |
private PrecinctDataBin |
dataBin |
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 and Description |
---|
PacketHeaderDataInputStream()
Constructor.
|
PacketHeaderDataInputStream(BufferedDataInputStream bufferedDataInputStream)
Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
getTagBit()
Retrieves a bit from the file.
|
private java.lang.String |
hexToString(byte b) |
void |
list(java.io.PrintStream out)
Prints this Packet Header Data Output Stream out to the
specified output stream.
|
int |
read() |
private byte |
readByte() |
void |
resetGetTagBit()
Reset the getTagBit flags to reinitialize the reading.
|
void |
setInput(BufferedDataInputStream bufferedDataInputStream) |
java.lang.String |
toString() |
private BufferedDataInputStream bufferedDataInputStream
private PrecinctDataBin dataBin
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.
public PacketHeaderDataInputStream()
public PacketHeaderDataInputStream(BufferedDataInputStream bufferedDataInputStream)
bufferedDataInputStream
- public void setInput(BufferedDataInputStream bufferedDataInputStream)
bufferedDataInputStream
- public void resetGetTagBit()
public int getTagBit() throws java.io.EOFException, java.io.IOException
java.io.EOFException
- when end of file is reachedjava.io.IOException
- if an I/O error occurspublic int read() throws java.io.EOFException, java.io.IOException
java.io.EOFException
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
public void list(java.io.PrintStream out)
out
- an output stream.private byte readByte() throws java.io.IOException
java.io.IOException
private java.lang.String hexToString(byte b)
CADI - Copyright (C) 2007
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Group on Interactive Coding of Images (GICI) (contact)