com.sagestudio.jh2n
Class RRecord

java.lang.Object
  extended bycom.sagestudio.jh2n.RRecord

public class RRecord
extends java.lang.Object

jh2n - host to named conversion program Copyright (C) 1998-2004 Craig Nelson craig@sagestudio.com This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. or point your browser to http://www.gnu.org/copyleft/copyleft.html


Field Summary
(package private) static boolean debug
           
 
Constructor Summary
(package private) RRecord()
          null constructor to ensure the static vars arent GC
(package private) RRecord(java.lang.String key, java.lang.String type, java.lang.String value)
           
 
Method Summary
static void addtoHash(RRecord addit)
           
static java.lang.String formatRR(java.lang.String key, java.lang.String type, java.lang.String value)
          formatRR method formats and returns a passed record pass it the key, record type, and value and it formats it real nice!
 java.lang.String FQDN()
          returns the fully qualified key name of the record
 java.lang.String getIPAddress()
          returns the IP address of a given RRecord looks it up if it has to!
 java.lang.String getrType()
          getrType method returns the type of record this is
static java.lang.String printDomain(java.lang.String domain)
          this String method returns all the for the domain matching the passed string
static void printDomain(java.lang.String domain, java.io.PrintWriter printout)
          this method prints all the records for the domain matching the passed string outputs the records to the passed printwriter object better than toString because PrintWriter understands local system EOL conventions
static java.lang.String printDomains()
          prints all the entries in the rDomainHash
static java.util.Enumeration rDomainKeys()
           
static java.util.Enumeration rListRecordsMatching(java.lang.String prefix)
          return an Enumeration containing all the RRecords whos FQDN match the given prefix
static java.util.Enumeration rListRecordsWithPrefix(java.lang.String prefix)
          return an Enumeration containing all the RRecords whos FQDN match the given prefix
 java.lang.String toString()
          this toString method formats and returns a given record
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

debug

static boolean debug
Constructor Detail

RRecord

RRecord(java.lang.String key,
        java.lang.String type,
        java.lang.String value)

RRecord

RRecord()
null constructor to ensure the static vars arent GC

Method Detail

toString

public java.lang.String toString()
this toString method formats and returns a given record


getrType

public java.lang.String getrType()
getrType method returns the type of record this is


formatRR

public static java.lang.String formatRR(java.lang.String key,
                                        java.lang.String type,
                                        java.lang.String value)
formatRR method formats and returns a passed record pass it the key, record type, and value and it formats it real nice!


FQDN

public java.lang.String FQDN()
returns the fully qualified key name of the record


getIPAddress

public java.lang.String getIPAddress()
returns the IP address of a given RRecord looks it up if it has to!


addtoHash

public static void addtoHash(RRecord addit)

printDomain

public static void printDomain(java.lang.String domain,
                               java.io.PrintWriter printout)
this method prints all the records for the domain matching the passed string outputs the records to the passed printwriter object better than toString because PrintWriter understands local system EOL conventions


printDomain

public static java.lang.String printDomain(java.lang.String domain)
this String method returns all the for the domain matching the passed string


printDomains

public static java.lang.String printDomains()
prints all the entries in the rDomainHash


rDomainKeys

public static java.util.Enumeration rDomainKeys()

rListRecordsWithPrefix

public static java.util.Enumeration rListRecordsWithPrefix(java.lang.String prefix)
return an Enumeration containing all the RRecords whos FQDN match the given prefix


rListRecordsMatching

public static java.util.Enumeration rListRecordsMatching(java.lang.String prefix)
return an Enumeration containing all the RRecords whos FQDN match the given prefix