|
Secure iNet Factory | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
java.io.ByteArrayInputStream
com.jscape.inet.dns.DnsInputStream
public class DnsInputStream
InputStream responsible for parsing byte[] data retrieved in communcations with a Dns server.
Constructor Summary | |
---|---|
DnsInputStream(byte[] data,
int off,
int len)
Constructs a new DnsInputStream instance. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.io.ByteArrayInputStream |
---|
available, close, mark, markSupported, read, read, reset, skip |
Methods inherited from class java.io.InputStream |
---|
read |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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.Method Detail |
---|
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 occurspublic DnsRecord readRecord() throws java.io.IOException
DnsRecord
from response.
DnsRecord
read.
java.io.IOException
- if an I/O error occursDnsRecord
|
Secure iNet Factory | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |