public class DnsInputStream
extends java.io.ByteArrayInputStream
Constructor and Description |
---|
DnsInputStream(byte[] data,
int off,
int len)
Constructs a new
DnsInputStream instance. |
Modifier and Type | Method and Description |
---|---|
int |
readByte()
Reads the next byte of data from this input stream.
|
java.lang.String |
readDomainName()
Parses out domain name from response.
|
long |
readInt()
Reads four input bytes and returns an int value.
|
DnsRecord |
readRecord()
Reads a
DnsRecord from response. |
int |
readShort()
Reads two input bytes and returns a unsigned short value.
|
java.lang.String |
readString()
Reads String from response.
|
public DnsInputStream(byte[] data, int off, int len)
DnsInputStream
instance.data
- the input bufferoff
- the offset in the buffer of the first byte to read.len
- the maximum number of bytes to read from the buffer.public int readByte() throws java.io.IOException
java.io.IOException
- if an I/O error occurspublic int readShort() throws java.io.IOException
java.io.IOException
- if an I/O error occurspublic long readInt() throws java.io.IOException
java.io.IOException
- if an I/O error occurspublic java.lang.String readString() throws java.io.IOException
java.io.IOException
- if an I/O error occurspublic java.lang.String readDomainName() throws java.io.IOException
java.io.IOException
- if an I/O error occursCopyright © JSCAPE LLC. 1999-2021. All Rights Reserved