java.lang.Object
org.minidns.record.Data
org.minidns.record.RRWithTarget
org.minidns.record.PTR
DNS PTR (Pointer) record payload.
Used for reverse DNS lookups, mapping IP addresses to domain names. Functionally similar to CNAME but used for reverse resolution.
Used for reverse DNS lookups, mapping IP addresses to domain names. Functionally similar to CNAME but used for reverse resolution.
Field Summary
Fields inherited from class RRWithTarget
targetConstructor Summary
Method Summary
Modifier and TypeMethodDescriptiongetType()The payload type.static PTRparse(DataInputStream dis, byte[] data) Parse a PTR record from a data stream.Methods inherited from class RRWithTarget
getTarget, serialize, toStringMethods inherited from class Data
equals, hashCode, length, toByteArray, toOutputStream, toOutputStreamModifier and TypeMethodDescriptionfinal booleanfinal inthashCode()final intlength()Serialize this record, if that has not been done already, and report the resulting wire size.final byte[]Serialize this record, if that has not been done already, and return a copy of the result so callers cannot mutate the cached bytes.final voidWrite the binary representation of this payload to the givenDataOutputStream.final voidtoOutputStream(OutputStream outputStream) Write the binary representation to the given OutputStream.
Constructor Details
Method Details
parse
Parse a PTR record from a data stream.- Parameters:
dis- the data input streamdata- the raw DNS message data- Returns:
- the parsed PTR record
- Throws:
IOException- if parsing fails
getType
Description copied from class:DataThe payload type.