Package com.oss.asn1
Class OctetString
java.lang.Object
com.oss.asn1.AbstractData
com.oss.asn1.AbstractBinary
com.oss.asn1.OctetString
- All Implemented Interfaces:
com.oss.asn1.Sizeable
,Serializable
,Cloneable
- Direct Known Subclasses:
ContainingOctetString
The OctetString class represents the ASN.1 OCTET STRING type.
- Since:
- ASN.1/Java 1.0-beta A
- See Also:
-
Field Summary
Fields inherited from class com.oss.asn1.AbstractData
EQUALS, GREATER_THAN, LESS_THAN
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
equalTo
(OctetString that) Compare 'this' object to another OctetString object to see if their contents are the same.final int
getSize()
Get the number of octets in the OctetString.Methods inherited from class com.oss.asn1.AbstractBinary
byteArrayValue, clone, delete, hashCode, setValue
Methods inherited from class com.oss.asn1.AbstractData
equals, isEncodable, isPDU, isValid, toString, toString
-
Constructor Details
-
OctetString
public OctetString()The default constructor. -
OctetString
public OctetString(byte[] value) Construct from a byte[].- Parameters:
value
- the byte[] to set 'this' object to.
-
-
Method Details
-
getSize
public final int getSize()Get the number of octets in the OctetString.- Specified by:
getSize
in interfacecom.oss.asn1.Sizeable
- Returns:
- integer value indicating the number of octets.
-
equalTo
Compare 'this' object to another OctetString object to see if their contents are the same.- Parameters:
that
- the OctetString object to compare 'this' object to.- Returns:
- true if contents of both objects are the same.
-