diff options
Diffstat (limited to 'core/java/android/net/DnsPacket.java')
| -rw-r--r-- | core/java/android/net/DnsPacket.java | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/core/java/android/net/DnsPacket.java b/core/java/android/net/DnsPacket.java index 0ac02b1b7b37..83e57e0a047b 100644 --- a/core/java/android/net/DnsPacket.java +++ b/core/java/android/net/DnsPacket.java @@ -71,7 +71,7 @@ public abstract class DnsPacket { } /** - * It's used both for DNS questions and DNS resource records. + * Superclass for DNS questions and DNS resource records. * * DNS questions (No TTL/RDATA) * DNS resource records (With TTL/RDATA) @@ -96,12 +96,13 @@ public abstract class DnsPacket { /** * Create a new DnsRecord from a positioned ByteBuffer. * - * @param ByteBuffer input of record, must be in network byte order - * (which is the default). * Reads the passed ByteBuffer from its current position and decodes a DNS record. * When this constructor returns, the reading position of the ByteBuffer has been * advanced to the end of the DNS header record. * This is meant to chain with other methods reading a DNS response in sequence. + * + * @param ByteBuffer input of record, must be in network byte order + * (which is the default). */ DnsRecord(int recordType, @NonNull ByteBuffer buf) throws BufferUnderflowException, ParseException { @@ -205,16 +206,6 @@ public abstract class DnsPacket { protected final DnsHeader mHeader; protected final List<DnsRecord>[] mRecords; - public static class ParseException extends Exception { - public ParseException(String msg) { - super(msg); - } - - public ParseException(String msg, Throwable cause) { - super(msg, cause); - } - } - protected DnsPacket(@NonNull byte[] data) throws ParseException { if (null == data) throw new ParseException("Parse header failed, null input data"); final ByteBuffer buffer; |
