Package org.minidns.record
Class InternetAddressRR<IA extends java.net.InetAddress>
- java.lang.Object
-
- org.minidns.record.Data
-
- org.minidns.record.InternetAddressRR<IA>
-
public abstract class InternetAddressRR<IA extends java.net.InetAddress> extends Data
A resource record representing a internet address. ProvidesgetInetAddress()
.
-
-
Field Summary
Fields Modifier and Type Field Description protected byte[]
ip
Target IP.
-
Constructor Summary
Constructors Modifier Constructor Description protected
InternetAddressRR(byte[] ip)
protected
InternetAddressRR(IA inetAddress)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static InternetAddressRR<? extends java.net.InetAddress>
from(java.net.InetAddress inetAddress)
IA
getInetAddress()
byte[]
getIp()
Allocates a new byte buffer and fills the buffer with the bytes representing the IP address of this resource record.void
serialize(java.io.DataOutputStream dos)
The internal method used to serialize Data subclasses.-
Methods inherited from class org.minidns.record.Data
equals, getType, hashCode, length, toByteArray, toOutputStream, toOutputStream
-
-
-
-
Field Detail
-
ip
protected final byte[] ip
Target IP.
-
-
Constructor Detail
-
InternetAddressRR
protected InternetAddressRR(byte[] ip)
-
InternetAddressRR
protected InternetAddressRR(IA inetAddress)
-
-
Method Detail
-
serialize
public final void serialize(java.io.DataOutputStream dos) throws java.io.IOException
Description copied from class:Data
The internal method used to serialize Data subclasses.
-
getIp
public final byte[] getIp()
Allocates a new byte buffer and fills the buffer with the bytes representing the IP address of this resource record.- Returns:
- a new byte buffer containing the bytes of the IP.
-
getInetAddress
public final IA getInetAddress()
-
from
public static InternetAddressRR<? extends java.net.InetAddress> from(java.net.InetAddress inetAddress)
-
-