Modifier and Type | Field and Description |
---|---|
private byte[] |
altitude |
private byte[] |
latitude |
private byte[] |
longitude |
Constructor and Description |
---|
GPOSRecord() |
GPOSRecord(Name name,
int dclass,
long ttl,
double longitude,
double latitude,
double altitude)
Creates an GPOS Record from the given data
|
GPOSRecord(Name name,
int dclass,
long ttl,
java.lang.String longitude,
java.lang.String latitude,
java.lang.String altitude)
Creates an GPOS Record from the given data
|
Modifier and Type | Method and Description |
---|---|
double |
getAltitude()
Returns the altitude as a double
|
java.lang.String |
getAltitudeString()
Returns the altitude as a string
|
double |
getLatitude()
Returns the latitude as a double
|
java.lang.String |
getLatitudeString()
Returns the latitude as a string
|
double |
getLongitude()
Returns the longitude as a double
|
java.lang.String |
getLongitudeString()
Returns the longitude as a string
|
protected void |
rdataFromString(Tokenizer st,
Name origin)
Converts the text format of an RR to the internal format - must be overriden
|
protected void |
rrFromWire(DNSInput in)
Converts the type-specific RR to wire format - must be overridden
|
protected java.lang.String |
rrToString()
Convert to a String
|
protected void |
rrToWire(DNSOutput out,
Compression c,
boolean canonical)
Converts the type-specific RR to wire format - must be overridden.
|
private void |
validate(double longitude,
double latitude) |
byteArrayFromString, byteArrayToString, checkByteArrayLength, checkName, checkU16, checkU32, checkU8, cloneRecord, compareTo, equals, fromString, fromString, fromWire, fromWire, fromWire, getAdditionalName, getDClass, getName, getRRsetType, getTTL, getType, hashCode, newRecord, newRecord, newRecord, newRecord, rdataToString, rdataToWireCanonical, sameRRset, setTTL, toString, toWire, toWire, toWireCanonical, unknownToString, withDClass, withName, writeReplace
private byte[] latitude
private byte[] longitude
private byte[] altitude
GPOSRecord()
public GPOSRecord(Name name, int dclass, long ttl, double longitude, double latitude, double altitude)
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).public GPOSRecord(Name name, int dclass, long ttl, java.lang.String longitude, java.lang.String latitude, java.lang.String altitude)
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).private void validate(double longitude, double latitude) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
protected void rrFromWire(DNSInput in) throws java.io.IOException
Record
rrFromWire
in class Record
java.io.IOException
protected void rdataFromString(Tokenizer st, Name origin) throws java.io.IOException
Record
rdataFromString
in class Record
java.io.IOException
protected java.lang.String rrToString()
rrToString
in class Record
public java.lang.String getLongitudeString()
public double getLongitude()
java.lang.NumberFormatException
- The string does not contain a valid numeric value.public java.lang.String getLatitudeString()
public double getLatitude()
java.lang.NumberFormatException
- The string does not contain a valid numeric value.public java.lang.String getAltitudeString()
public double getAltitude()
java.lang.NumberFormatException
- The string does not contain a valid numeric value.protected void rrToWire(DNSOutput out, Compression c, boolean canonical)
Record