org.jwall.rbl.dns
Class QuerySection

java.lang.Object
  extended by org.jwall.rbl.dns.QuerySection

public final class QuerySection
extends Object

This class represents a simple QuerySection.

Author:
Christian Bockermann <chris@jwall.org>

Field Summary
static int QUERY_CLASS_IN
           
static int QUERY_TYPE_A
           
static int QUERY_TYPE_CNAME
           
static int QUERY_TYPE_MX
           
static int QUERY_TYPE_NS
           
static int QUERY_TYPE_PTR
           
static int QUERY_TYPE_SOA
           
static int QUERY_TYPE_TXT
           
 
Method Summary
 int getQClass()
          Returns the query class of this section.
 String getQName()
          This method returns the query name as a readable string.
 int getQType()
          Reqturns the query type of this section.
 int length()
          This method returns the complete length in bytes of this query section.
static QuerySection read(byte[] buf, int offset)
          This method parses a query section from the given buffer.
 byte[] toByteArray()
          This method returns this query section in form of a byte array, which reflects the appropriate format for sending this section over the wire.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

QUERY_CLASS_IN

public static final int QUERY_CLASS_IN
See Also:
Constant Field Values

QUERY_TYPE_A

public static final int QUERY_TYPE_A
See Also:
Constant Field Values

QUERY_TYPE_NS

public static final int QUERY_TYPE_NS
See Also:
Constant Field Values

QUERY_TYPE_CNAME

public static final int QUERY_TYPE_CNAME
See Also:
Constant Field Values

QUERY_TYPE_SOA

public static final int QUERY_TYPE_SOA
See Also:
Constant Field Values

QUERY_TYPE_PTR

public static final int QUERY_TYPE_PTR
See Also:
Constant Field Values

QUERY_TYPE_MX

public static final int QUERY_TYPE_MX
See Also:
Constant Field Values

QUERY_TYPE_TXT

public static final int QUERY_TYPE_TXT
See Also:
Constant Field Values
Method Detail

getQClass

public int getQClass()
Returns the query class of this section.

Returns:

getQType

public int getQType()
Reqturns the query type of this section.

Returns:

getQName

public String getQName()
This method returns the query name as a readable string.

Returns:

length

public int length()
This method returns the complete length in bytes of this query section.

Returns:

read

public static QuerySection read(byte[] buf,
                                int offset)
                         throws Exception
This method parses a query section from the given buffer. Parsing starts at the specified offset within that buffer.

Parameters:
buf -
offset -
Returns:
Throws:
Exception

toByteArray

public byte[] toByteArray()
This method returns this query section in form of a byte array, which reflects the appropriate format for sending this section over the wire.

Returns:


Copyright © 2014. All Rights Reserved.