Package org.xbill.DNS
Class GPOSRecord
java.lang.Object
org.xbill.DNS.Record
org.xbill.DNS.GPOSRecord
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<Record>
Geographical Location - describes the physical location of a host. (withdrawn -- this was a
limited early version of
LOCRecord)- Author:
- Brian Wellington
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionGPOSRecord(Name name, int dclass, long ttl, double longitude, double latitude, double altitude) Creates an GPOS Record from the given dataGPOSRecord(Name name, int dclass, long ttl, String longitude, String latitude, String altitude) Creates an GPOS Record from the given data -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the altitude as a doubleReturns the altitude as a stringdoubleReturns the latitude as a doubleReturns the latitude as a stringdoubleReturns the longitude as a doubleReturns the longitude as a stringprotected 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
-
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
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
-
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
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
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
Description copied from class:RecordConverts the type-specific RR to wire format - must be overridden.
-