Modifier and Type | Field and Description |
---|---|
private long |
altitude |
private long |
hPrecision |
private long |
latitude |
private long |
longitude |
private long |
size |
private long |
vPrecision |
private static java.text.NumberFormat |
w2 |
private static java.text.NumberFormat |
w3 |
Constructor and Description |
---|
LOCRecord() |
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
|
Modifier and Type | Method and Description |
---|---|
double |
getAltitude()
Returns the altitude
|
double |
getHPrecision()
Returns the horizontal precision
|
double |
getLatitude()
Returns the latitude
|
double |
getLongitude()
Returns the longitude
|
double |
getSize()
Returns the diameter of the enclosing sphere
|
double |
getVPrecision()
Returns the horizontal precision
|
private long |
parseDouble(Tokenizer st,
java.lang.String type,
boolean required,
long min,
long max,
long defaultValue) |
private double |
parseFixedPoint(java.lang.String s) |
private static long |
parseLOCformat(int b) |
private long |
parsePosition(Tokenizer st,
java.lang.String type) |
private java.lang.String |
positionToString(long value,
char pos,
char neg) |
protected void |
rdataFromString(Tokenizer st,
Name origin)
Converts the text format of an RR to the internal format - must be overriden
|
private void |
renderFixedPoint(java.lang.StringBuilder sb,
java.text.NumberFormat formatter,
long value,
long divisor) |
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 int |
toLOCformat(long l) |
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, sameRRset, setTTL, toString, toWire, toWire, toWireCanonical, unknownToString, withDClass, withName, writeReplace
private static final java.text.NumberFormat w2
private static final java.text.NumberFormat w3
private long size
private long hPrecision
private long vPrecision
private long latitude
private long longitude
private long altitude
LOCRecord()
public LOCRecord(Name name, int dclass, long ttl, double latitude, double longitude, double altitude, double size, double hPrecision, double vPrecision)
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.protected void rrFromWire(DNSInput in) throws java.io.IOException
Record
rrFromWire
in class Record
java.io.IOException
private double parseFixedPoint(java.lang.String s)
private long parsePosition(Tokenizer st, java.lang.String type) throws java.io.IOException
java.io.IOException
private long parseDouble(Tokenizer st, java.lang.String type, boolean required, long min, long max, long defaultValue) throws java.io.IOException
java.io.IOException
protected void rdataFromString(Tokenizer st, Name origin) throws java.io.IOException
Record
rdataFromString
in class Record
java.io.IOException
private void renderFixedPoint(java.lang.StringBuilder sb, java.text.NumberFormat formatter, long value, long divisor)
private java.lang.String positionToString(long value, char pos, char neg)
protected java.lang.String rrToString()
rrToString
in class Record
public double getLatitude()
public double getLongitude()
public double getAltitude()
public double getSize()
public double getHPrecision()
public double getVPrecision()
protected void rrToWire(DNSOutput out, Compression c, boolean canonical)
Record
private static long parseLOCformat(int b) throws WireParseException
WireParseException
private int toLOCformat(long l)