|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.xbill.DNS.DNSOutput
public class DNSOutput
A class for rendering DNS messages.
| Constructor Summary | |
|---|---|
DNSOutput()
Create a new DNSOutput |
|
DNSOutput(int size)
Create a new DNSOutput with a specified size. |
|
| Method Summary | |
|---|---|
int |
current()
Returns the current position. |
void |
jump(int index)
Resets the current position of the output stream to the specified index. |
void |
restore()
Restores the input stream to its state before the call to save(). |
void |
save()
Saves the current state of the output stream. |
byte[] |
toByteArray()
Returns a byte array containing the current contents of the stream. |
void |
writeByteArray(byte[] b)
Writes a byte array to the stream. |
void |
writeByteArray(byte[] b,
int off,
int len)
Writes a byte array to the stream. |
void |
writeCountedString(byte[] s)
Writes a counted string from the stream. |
void |
writeU16(int val)
Writes an unsigned 16 bit value to the stream. |
void |
writeU32(long val)
Writes an unsigned 32 bit value to the stream. |
void |
writeU8(int val)
Writes an unsigned 8 bit value to the stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DNSOutput(int size)
size - The initial sizepublic DNSOutput()
| Method Detail |
|---|
public int current()
public void jump(int index)
index - The new current position.
IllegalArgumentException - The index is not within the output.public void save()
IllegalArgumentException - The index is not within the output.public void restore()
save().
public void writeU8(int val)
val - The value to be writtenpublic void writeU16(int val)
val - The value to be writtenpublic void writeU32(long val)
val - The value to be written
public void writeByteArray(byte[] b,
int off,
int len)
b - The array to write.off - The offset of the array to start copying data from.len - The number of bytes to write.public void writeByteArray(byte[] b)
b - The array to write.public void writeCountedString(byte[] s)
s - The string to write.public byte[] toByteArray()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||