|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
java.io.ByteArrayInputStream
org.xbill.DNS.utils.DataByteInputStream
An extension of ByteArrayInputStream to support directly reading types used by DNS routines.
DataByteOutputStream
Field Summary |
Fields inherited from class java.io.ByteArrayInputStream |
buf, count, mark, pos |
Constructor Summary | |
DataByteInputStream(byte[] b)
Creates a new DataByteInputStream |
Method Summary | |
int |
getPos()
Get the current position in the stream |
int |
read(byte[] b)
Read data from the stream. |
int |
readArray(byte[] b,
int pos,
int len)
Read data from the stream. |
BigInteger |
readBigInteger(int len)
Read a BigInteger from the stream, encoded as binary data. |
byte |
readByte()
Read a byte from the stream |
int |
readInt()
Read an int from the stream |
long |
readLong()
Read a long from the stream |
short |
readShort()
Read a short from the stream |
String |
readString()
Read a String from the stream, represented as a length byte followed by data |
byte[] |
readStringIntoArray()
Read a String from the stream, represented as a length byte followed by data, and encode it in a byte array. |
int |
readUnsignedByte()
Read an unsigned byte from the stream |
long |
readUnsignedInt()
Read an unsigned int from the stream |
int |
readUnsignedShort()
Read an unsigned short from the stream |
void |
setPos(int pos)
Sets the current position in the stream |
void |
skipBytes(int n)
Read and ignore bytes from the stream |
Methods inherited from class java.io.ByteArrayInputStream |
available, close, mark, markSupported, read, read, reset, skip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DataByteInputStream(byte[] b)
b
- The byte array to read fromMethod Detail |
public int read(byte[] b) throws IOException
b
- The array to read into
IOException
public int readArray(byte[] b, int pos, int len) throws IOException
b
- The array to read intopos
- The starting positionlen
- The number of bytes to read
IOException
public byte readByte() throws IOException
IOException
public int readUnsignedByte() throws IOException
IOException
public short readShort() throws IOException
IOException
public int readUnsignedShort() throws IOException
IOException
public int readInt() throws IOException
IOException
public long readUnsignedInt() throws IOException
IOException
public long readLong() throws IOException
IOException
public byte[] readStringIntoArray() throws IOException
IOException
public String readString() throws IOException
IOException
public BigInteger readBigInteger(int len) throws IOException
len
- The number of bytes to read
IOException
public void skipBytes(int n) throws IOException
n
- The number of bytes to skip
IOException
public int getPos()
public void setPos(int pos)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |