Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.act365.net.dns
Class DNSReader  view DNSReader download DNSReader.java

java.lang.Object
  extended bycom.act365.net.dns.DNSReader

public class DNSReader
extends java.lang.Object

Reads DNS messages from bytestreams.


Field Summary
(package private)  int headerLength
           
 
Constructor Summary
DNSReader(int headerLength)
          Constructs a parser to decode DNS bytestreams.
 
Method Summary
(package private)  java.lang.String dataString(byte[] buffer, int offset, int count, short type)
          Converts the data in a ResourceRecord object into an appropriate string.
(package private)  int domainName(byte[] buffer, int offset, java.lang.StringBuffer name)
          Extracts a domain name string from a DNS message, even if compressed.
 DNSMessage read(byte[] buffer)
          Reads all of the information from a DNS response.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

headerLength

int headerLength
Constructor Detail

DNSReader

public DNSReader(int headerLength)
Constructs a parser to decode DNS bytestreams.

Method Detail

domainName

int domainName(byte[] buffer,
               int offset,
               java.lang.StringBuffer name)
         throws java.lang.Exception
Extracts a domain name string from a DNS message, even if compressed.


dataString

java.lang.String dataString(byte[] buffer,
                            int offset,
                            int count,
                            short type)
                      throws java.lang.Exception
Converts the data in a ResourceRecord object into an appropriate string.


read

public DNSMessage read(byte[] buffer)
                throws java.lang.Exception
Reads all of the information from a DNS response.