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.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate longprivate longprivate longprivate longprivate longprivate longprivate static final NumberFormatprivate static final NumberFormat -
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 precisionprivate longparseDouble(Tokenizer st, String type, boolean required, long min, long max, long defaultValue) private doubleprivate static longparseLOCformat(int b) private longparsePosition(Tokenizer st, String type) private StringpositionToString(long value, char pos, char neg) protected voidrdataFromString(Tokenizer st, Name origin) Converts the text format of an RR to the internal format - must be overridenprivate voidrenderFixedPoint(StringBuilder sb, NumberFormat formatter, long value, long divisor) protected 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.private inttoLOCformat(long l) Methods inherited from class org.xbill.DNS.Record
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
-
Field Details
-
w2
-
w3
-
size
private long size -
hPrecision
private long hPrecision -
vPrecision
private long vPrecision -
latitude
private long latitude -
longitude
private long longitude -
altitude
private long altitude
-
-
Constructor Details
-
LOCRecord
LOCRecord() -
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
-
parseFixedPoint
-
parsePosition
- Throws:
IOException
-
parseDouble
private long parseDouble(Tokenizer st, String type, boolean required, long min, long max, long defaultValue) throws IOException - 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
-
renderFixedPoint
-
positionToString
-
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. -
parseLOCformat
- Throws:
WireParseException
-
toLOCformat
private int toLOCformat(long l)
-