Package org.xbill.DNS
Class LOCRecord
java.lang.Object
org.xbill.DNS.Record
org.xbill.DNS.LOCRecord
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<Record>
Location - describes the physical location of hosts, networks, subnets.
- Author:
- Brian Wellington
- See Also:
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the altitudedoubleReturns the horizontal precisiondoubleReturns the latitudedoubleReturns the longitudedoublegetSize()Returns the diameter of the enclosing spheredoubleReturns the horizontal precisionprotected voidrdataFromString(Tokenizer st, Name origin) Converts the text format of an RR to the internal format - must be overridenprotected voidrrFromWire(DNSInput in) Converts the type-specific RR to wire format - must be overriddenprotected StringConvert to a Stringprotected voidrrToWire(DNSOutput out, Compression c, boolean canonical) Converts the type-specific RR to wire format - must be overridden.Methods inherited from class org.xbill.DNS.Record
byteArrayFromString, byteArrayToString, compareTo, equals, fromString, fromString, fromWire, getAdditionalName, getDClass, getName, getRRsetType, getTTL, getType, hashCode, newRecord, newRecord, newRecord, newRecord, rdataToString, rdataToWireCanonical, sameRRset, sameRRset, toString, toWire, toWireCanonical, unknownToString, withName
-
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 spherelongitude- The longitude of the center of the spherealtitude- The altitude of the center of the sphere, in msize- 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
Description copied from class:RecordConverts the type-specific RR to wire format - must be overridden- Specified by:
rrFromWirein classRecord- Throws:
IOException
-
rdataFromString
Description copied from class:RecordConverts the text format of an RR to the internal format - must be overriden- Specified by:
rdataFromStringin classRecord- Throws:
IOException
-
rrToString
Convert to a String- Specified by:
rrToStringin classRecord
-
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
Description copied from class:RecordConverts the type-specific RR to wire format - must be overridden.
-