|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
java.io.ByteArrayOutputStream
org.xbill.DNS.utils.DataByteOutputStream
An extension of ByteArrayOutputStream to support directly writing types used by DNS routines.
DataByteInputStream
Field Summary |
Fields inherited from class java.io.ByteArrayOutputStream |
buf, count |
Constructor Summary | |
DataByteOutputStream()
Create a new DataByteOutputStream with the default initial size |
|
DataByteOutputStream(int size)
Create a new DataByteOutputStream with a specified initial size |
Method Summary | |
int |
getPos()
Get the current position in the stream |
void |
setPos(int pos)
Set the current position in the stream |
void |
writeArray(byte[] b)
Writes a full byte array to the stream. |
void |
writeArray(byte[] b,
boolean writeLength)
Writes a full byte array to the stream. |
void |
writeBigInteger(BigInteger i)
Writes a BigInteger to the stream, encoded as binary data. |
void |
writeByte(int i)
Writes a byte to the stream |
void |
writeInt(int i)
Writes an int to the stream |
void |
writeLong(long l)
Writes a long to the stream |
void |
writeShort(int i)
Writes a short to the stream |
void |
writeShortAt(int i,
int pos)
Writes a short to the stream at a specific location |
void |
writeString(byte[] s,
int start)
Writes a string represented by a byte array to the stream, encoded as a length byte followed by data |
void |
writeString(String s)
Writes a String to the stream, encoded as a length byte followed by data |
Methods inherited from class java.io.ByteArrayOutputStream |
close, reset, size, toByteArray, toString, toString, toString, write, write, writeTo |
Methods inherited from class java.io.OutputStream |
flush, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public DataByteOutputStream(int size)
size
- The initial sizepublic DataByteOutputStream()
Method Detail |
public void writeByte(int i)
i
- The byte to be writtenpublic void writeShort(int i)
i
- The short to be writtenpublic void writeInt(int i)
i
- The int to be writtenpublic void writeLong(long l)
l
- The long to be writtenpublic void writeString(String s)
s
- The String to be writtenpublic void writeString(byte[] s, int start)
s
- The byte array containing the string to be writtenstart
- The start of the string withing the byte array.public void writeArray(byte[] b, boolean writeLength)
b
- The byte array to be written.public void writeArray(byte[] b)
b
- The byte array to be written.public void writeBigInteger(BigInteger i)
i
- The BigInteger to be writtenpublic void writeShortAt(int i, int pos)
i
- The short to be writtenpos
- The position at which the write occurspublic void setPos(int pos)
pos
- The current positionpublic int getPos()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |