Package org.xbill.DNS

Class GPOSRecord

java.lang.Object
org.xbill.DNS.Record
org.xbill.DNS.GPOSRecord
All Implemented Interfaces:
Serializable, Cloneable, Comparable<Record>

public class GPOSRecord extends Record
Geographical Location - describes the physical location of a host. (withdrawn -- this was a limited early version of LOCRecord)
Author:
Brian Wellington
See Also:
  • Constructor Details

    • GPOSRecord

      public GPOSRecord(Name name, int dclass, long ttl, double longitude, double latitude, double altitude)
      Creates an GPOS Record from the given data
      Parameters:
      longitude - The longitude component of the location.
      latitude - The latitude component of the location.
      altitude - The altitude component of the location (in meters above sea level).
    • GPOSRecord

      public GPOSRecord(Name name, int dclass, long ttl, String longitude, String latitude, String altitude)
      Creates an GPOS Record from the given data
      Parameters:
      longitude - The longitude component of the location.
      latitude - The latitude component of the location.
      altitude - The altitude component of the location (in meters above sea level).
  • Method Details

    • rrFromWire

      protected void rrFromWire(DNSInput in) throws IOException
      Description copied from class: Record
      Converts the type-specific RR to wire format - must be overridden
      Specified by:
      rrFromWire in class Record
      Throws:
      IOException
    • rdataFromString

      protected void rdataFromString(Tokenizer st, Name origin) throws IOException
      Description copied from class: Record
      Converts the text format of an RR to the internal format - must be overriden
      Specified by:
      rdataFromString in class Record
      Throws:
      IOException
    • rrToString

      protected String rrToString()
      Convert to a String
      Specified by:
      rrToString in class Record
    • getLongitudeString

      public String getLongitudeString()
      Returns the longitude as a string
    • getLongitude

      public double getLongitude()
      Returns the longitude as a double
      Throws:
      NumberFormatException - The string does not contain a valid numeric value.
    • getLatitudeString

      public String getLatitudeString()
      Returns the latitude as a string
    • getLatitude

      public double getLatitude()
      Returns the latitude as a double
      Throws:
      NumberFormatException - The string does not contain a valid numeric value.
    • getAltitudeString

      public String getAltitudeString()
      Returns the altitude as a string
    • getAltitude

      public double getAltitude()
      Returns the altitude as a double
      Throws:
      NumberFormatException - The string does not contain a valid numeric value.
    • rrToWire

      protected void rrToWire(DNSOutput out, Compression c, boolean canonical)
      Description copied from class: Record
      Converts the type-specific RR to wire format - must be overridden.
      Specified by:
      rrToWire in class Record