Package org.xbill.DNS

Class LOCRecord

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

public class LOCRecord extends Record
Location - describes the physical location of hosts, networks, subnets.
Author:
Brian Wellington
See Also:
  • Constructor Details

    • LOCRecord

      public LOCRecord(Name name, int dclass, long ttl, double latitude, double longitude, double altitude, double size, double hPrecision, double vPrecision)
      Creates an LOC Record from the given data
      Parameters:
      latitude - The latitude of the center of the sphere
      longitude - The longitude of the center of the sphere
      altitude - The altitude of the center of the sphere, in m
      size - The diameter of a sphere enclosing the described entity, in m.
      hPrecision - The horizontal precision of the data, in m.
      vPrecision - The vertical precision of the data, in m.
  • 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
    • getLatitude

      public double getLatitude()
      Returns the latitude
    • getLongitude

      public double getLongitude()
      Returns the longitude
    • getAltitude

      public double getAltitude()
      Returns the altitude
    • getSize

      public double getSize()
      Returns the diameter of the enclosing sphere
    • getHPrecision

      public double getHPrecision()
      Returns the horizontal precision
    • getVPrecision

      public double getVPrecision()
      Returns the horizontal precision
    • 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