com.internationalnetwork.net
Class RR

Object
  extended by com.internationalnetwork.net.RR
Direct Known Subclasses:
A, AAAA, AFSDB, CNAME, GPOS, HINFO, ISDN, MB, MD, MF, MG, MINFO, MR, MX, NS, PTR, RP, RT, SOA, TXT, X25

public abstract class RR
extends Object

Resource Record types used in DNS.


Field Summary
static int A
          Type 1: IPv4 address
static int A6
          Type 38: A6
static int AAAA
          Type 28: IPv6 address
static int AFSDB
          Type 18: AFS data base location
static int ATMA
          Type 34: ATM address
static int CERT
          Type 37: Certificate
static int CLASS_CH
          Class type 3: The Chaos class
static int CLASS_CS
          Class type 2: The CSNET class (obsolete -- used to document examples in some obsolete RFCs)
static int CLASS_HS
          Class type 4: The Hesiod class (essentially a YP-style service that uses DNS to obtain information about "passwd" file entries on Unix hosts, file systems, default printers, and other arbitrary data which is typically stored as text strings in TXT records)
static int CLASS_IN
          Class type 1: The InterNet System class (this is most likely the only one you'll ever need to use)
static int CNAME
          Type 5: Canonical name for an alias
static int DNAME
          Type 39: Non-terminate DNS name redirection
static int EID
          Type 31: Endpoint identifier
static int GPOS
          Type 27: Geographical position
static int HINFO
          Type 13: Host information
static int ISDN
          Type 20: ISDN address
static int KEY
          Type 25: Security key
static int KX
          Type 36: Key exchanger
static int LOC
          Type 29: Location information (a.k.a., ICBM)
static int MB
          Type 7: Mailbox domain name
static int MD
          Type 3: Mail destination
static int MF
          Type 4: Mail forwarder
static int MG
          Type 8: Mail group member
static int MINFO
          Type 14: Mailbox or mailing list information
static int MR
          Type 9: Mail rename domain name
static int MX
          Type 15: Mail exchange
static int NAPTR
          Type 35: Naming authority pointer
static int NIMLOC
          Type 32: Nimrod locator
static int NS
          Type 2: Name server
static int NSAP
          Type 22: Network service access point
static int NSAP_PTR
          Type 23: Network service access point, opposite of NSAP
static int NULL
          Type 10: Null
static int NXT
          Type 30: Next domain
static int OPT
          Type 41: Option extension mechanisms for DNS
static int PTR
          Type 12: Domain name pointer
static int PX
          Type 26: X.400 mail mapping information
static int RP
          Type 17: Responsible person
static String[] RR_TYPES
          Array of Resource Record names (read-only).
protected  String[] rrData
          Data that applies directly to this record (used inconsistently).
 int rrType
          Resource Record type (read-only, set dynamically with initialization).
static int RT
          Type 21: Route through
static int SIG
          Type 24: Security signature
static int SINK
          Type 40: Kitchen sink
static int SOA
          Type 6: Source of zone authority
static int SRV
          Type 33: Server selection
static int TXT
          Type 16: Text strings
static String VERSION
          Version number of this Package (read-only).
static int WKS
          Type 11: Well known service
static int X25
          Type 19: X.25 PSDN address
 
Constructor Summary
RR(int rrType)
          Constructor for a basic record with the type and some data defined.
RR(int rrType, int numberOfElements)
          Constructor for a basic record with only the type defined.
RR(int rrType, String... rrData)
          Constructor for a basic record with the type and some data defined.
RR(int rrType, String rrData)
          Constructor for a basic record with the type and some data defined.
RR(String rrType, String rrData)
          Constructor for a basic record with the type and some data defined.
 
Method Summary
static RR parseRR(int rrType, String rrData)
          Constructs a subclass of the appropriate RR based on the record type and data provided.
static RR parseRR(String record)
          Constructs a subclass of the appropriate RR based on the record provided.
static RR parseRR(String rrType, String rrData)
          Constructs a subclass of the appropriate RR based on the record type and data provided.
abstract  String toString()
          Convert record to String.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

A

public static final int A
Type 1: IPv4 address

See Also:
Constant Field Values

A6

public static final int A6
Type 38: A6

See Also:
Constant Field Values

AAAA

public static final int AAAA
Type 28: IPv6 address

See Also:
Constant Field Values

AFSDB

public static final int AFSDB
Type 18: AFS data base location

See Also:
Constant Field Values

ATMA

public static final int ATMA
Type 34: ATM address

See Also:
Constant Field Values

CERT

public static final int CERT
Type 37: Certificate

See Also:
Constant Field Values

CLASS_CH

public static final int CLASS_CH
Class type 3: The Chaos class

See Also:
Constant Field Values

CLASS_CS

public static final int CLASS_CS
Class type 2: The CSNET class (obsolete -- used to document examples in some obsolete RFCs)

See Also:
Constant Field Values

CLASS_HS

public static final int CLASS_HS
Class type 4: The Hesiod class (essentially a YP-style service that uses DNS to obtain information about "passwd" file entries on Unix hosts, file systems, default printers, and other arbitrary data which is typically stored as text strings in TXT records)

See Also:
Constant Field Values

CLASS_IN

public static final int CLASS_IN
Class type 1: The InterNet System class (this is most likely the only one you'll ever need to use)

See Also:
Constant Field Values

CNAME

public static final int CNAME
Type 5: Canonical name for an alias

See Also:
Constant Field Values

DNAME

public static final int DNAME
Type 39: Non-terminate DNS name redirection

See Also:
Constant Field Values

EID

public static final int EID
Type 31: Endpoint identifier

See Also:
Constant Field Values

GPOS

public static final int GPOS
Type 27: Geographical position

See Also:
Constant Field Values

HINFO

public static final int HINFO
Type 13: Host information

See Also:
Constant Field Values

ISDN

public static final int ISDN
Type 20: ISDN address

See Also:
Constant Field Values

KEY

public static final int KEY
Type 25: Security key

See Also:
Constant Field Values

KX

public static final int KX
Type 36: Key exchanger

See Also:
Constant Field Values

LOC

public static final int LOC
Type 29: Location information (a.k.a., ICBM)

See Also:
Constant Field Values

MB

public static final int MB
Type 7: Mailbox domain name

See Also:
Constant Field Values

MD

public static final int MD
Type 3: Mail destination

See Also:
Constant Field Values

MF

public static final int MF
Type 4: Mail forwarder

See Also:
Constant Field Values

MG

public static final int MG
Type 8: Mail group member

See Also:
Constant Field Values

MINFO

public static final int MINFO
Type 14: Mailbox or mailing list information

See Also:
Constant Field Values

MR

public static final int MR
Type 9: Mail rename domain name

See Also:
Constant Field Values

MX

public static final int MX
Type 15: Mail exchange

See Also:
Constant Field Values

NAPTR

public static final int NAPTR
Type 35: Naming authority pointer

See Also:
Constant Field Values

NIMLOC

public static final int NIMLOC
Type 32: Nimrod locator

See Also:
Constant Field Values

NS

public static final int NS
Type 2: Name server

See Also:
Constant Field Values

NSAP

public static final int NSAP
Type 22: Network service access point

See Also:
Constant Field Values

NSAP_PTR

public static final int NSAP_PTR
Type 23: Network service access point, opposite of NSAP

See Also:
Constant Field Values

NULL

public static final int NULL
Type 10: Null

See Also:
Constant Field Values

NXT

public static final int NXT
Type 30: Next domain

See Also:
Constant Field Values

OPT

public static final int OPT
Type 41: Option extension mechanisms for DNS

See Also:
Constant Field Values

PTR

public static final int PTR
Type 12: Domain name pointer

See Also:
Constant Field Values

PX

public static final int PX
Type 26: X.400 mail mapping information

See Also:
Constant Field Values

RP

public static final int RP
Type 17: Responsible person

See Also:
Constant Field Values

RR_TYPES

public static final String[] RR_TYPES
Array of Resource Record names (read-only). The index number into this array intentionally corresponds with the name.


rrData

protected final String[] rrData
Data that applies directly to this record (used inconsistently).


rrType

public final int rrType
Resource Record type (read-only, set dynamically with initialization).


RT

public static final int RT
Type 21: Route through

See Also:
Constant Field Values

SIG

public static final int SIG
Type 24: Security signature

See Also:
Constant Field Values

SINK

public static final int SINK
Type 40: Kitchen sink

See Also:
Constant Field Values

SOA

public static final int SOA
Type 6: Source of zone authority

See Also:
Constant Field Values

SRV

public static final int SRV
Type 33: Server selection

See Also:
Constant Field Values

TXT

public static final int TXT
Type 16: Text strings

See Also:
Constant Field Values

VERSION

public static final String VERSION
Version number of this Package (read-only).

See Also:
Constant Field Values

WKS

public static final int WKS
Type 11: Well known service

See Also:
Constant Field Values

X25

public static final int X25
Type 19: X.25 PSDN address

See Also:
Constant Field Values
Constructor Detail

RR

public RR(int rrType)
Constructor for a basic record with the type and some data defined.

Parameters:
rrType - Resource record type

RR

public RR(int rrType,
          int numberOfElements)
Constructor for a basic record with only the type defined.

Parameters:
rrType - Resource record type

RR

public RR(int rrType,
          String... rrData)
Constructor for a basic record with the type and some data defined.

Parameters:
rrType - Resource record type
rrData - Resource record data (as a String[] array or multiple String objeccts) comprised of one or more strings

RR

public RR(int rrType,
          String rrData)
Constructor for a basic record with the type and some data defined.

Parameters:
rrType - Resource record type
rrData - Resource record data containing space-delimited fields

RR

public RR(String rrType,
          String rrData)
Constructor for a basic record with the type and some data defined.

Parameters:
rrType - Resource record type as a case-insensitive String
rrData - Resource record data containing space-delimited fields
Method Detail

parseRR

public static RR parseRR(int rrType,
                         String rrData)
Constructs a subclass of the appropriate RR based on the record type and data provided.

Parameters:
rrType - Resource record type as a case-insensitive String
rrData - Resource record data containing space-delimited fields

parseRR

public static RR parseRR(String record)
Constructs a subclass of the appropriate RR based on the record provided.

Parameters:
record - Resource record starting with the type as a case-insensitive String, a space, and the record data containing space-delimited fields
Returns:
Resource record from com.internationalnetwork.net.rr, or null if the type is not supported

parseRR

public static RR parseRR(String rrType,
                         String rrData)
Constructs a subclass of the appropriate RR based on the record type and data provided.

Parameters:
rrType - Resource record type as a case-insensitive String
rrData - Resource record data containing space-delimited fields

toString

public abstract String toString()
Convert record to String.

Overrides:
toString in class Object
Returns:
This record, represented as a human-readable string (note that some record types include raw binary data and can't be converted to a string; in such cases, the class should provide a toBytes() convenience method)