Package org.microproxy.dns
Record Class DnsMessage.Opaque
java.lang.Object
java.lang.Record
org.microproxy.dns.DnsMessage.Opaque
- Record Components:
bytes- the RDATA (not copied)
- All Implemented Interfaces:
DnsMessage.Rdata
- Enclosing class:
DnsMessage
RDATA of a type without a typed view, kept as bytes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]bytes()Returns the value of thebytesrecord component.byte[]encode(int type) The RDATA for a record oftype.booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.text()Returns the data in presentation format, as a zone file shows it.toString()Returns a string representation of this record class.
-
Constructor Details
-
Opaque
public Opaque(byte[] bytes) Checks the bytes.- Parameters:
bytes- the RDATA
-
-
Method Details
-
text
Description copied from interface:DnsMessage.RdataReturns the data in presentation format, as a zone file shows it.- Specified by:
textin interfaceDnsMessage.Rdata- Returns:
- the data in presentation format, as a zone file shows it
-
encode
public byte[] encode(int type) Description copied from interface:DnsMessage.RdataThe RDATA for a record oftype.- Specified by:
encodein interfaceDnsMessage.Rdata- Parameters:
type- the record's type- Returns:
- the RDATA bytes
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
bytes
public byte[] bytes()Returns the value of thebytesrecord component.- Returns:
- the value of the
bytesrecord component
-