public abstract class ASN1OctetString extends ASN1Primitive implements ASN1OctetStringParser
Modifier and Type | Field and Description |
---|---|
(package private) byte[] |
string |
Constructor and Description |
---|
ASN1OctetString(byte[] string) |
Modifier and Type | Method and Description |
---|---|
(package private) boolean |
asn1Equals(ASN1Primitive o) |
(package private) abstract void |
encode(ASN1OutputStream out) |
static ASN1OctetString |
getInstance(ASN1TaggedObject obj,
boolean explicit)
return an Octet String from a tagged object.
|
static ASN1OctetString |
getInstance(java.lang.Object obj)
return an Octet String from the given object.
|
ASN1Primitive |
getLoadedObject() |
byte[] |
getOctets() |
java.io.InputStream |
getOctetStream() |
int |
hashCode() |
ASN1OctetStringParser |
parser() |
(package private) ASN1Primitive |
toDERObject() |
(package private) ASN1Primitive |
toDLObject() |
java.lang.String |
toString() |
encodedLength, equals, fromByteArray, isConstructed, toASN1Primitive
getEncoded, getEncoded, hasEncodedTagValue, toASN1Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
toASN1Primitive
public ASN1OctetString(byte[] string)
string
- the octets making up the octet string.public static ASN1OctetString getInstance(ASN1TaggedObject obj, boolean explicit)
obj
- the tagged object holding the object we want.explicit
- true if the object is meant to be explicitly
tagged false otherwise.java.lang.IllegalArgumentException
- if the tagged object cannot
be converted.public static ASN1OctetString getInstance(java.lang.Object obj)
obj
- the object we want converted.java.lang.IllegalArgumentException
- if the object cannot be converted.public java.io.InputStream getOctetStream()
getOctetStream
in interface ASN1OctetStringParser
public ASN1OctetStringParser parser()
public byte[] getOctets()
public int hashCode()
hashCode
in class ASN1Primitive
boolean asn1Equals(ASN1Primitive o)
asn1Equals
in class ASN1Primitive
public ASN1Primitive getLoadedObject()
getLoadedObject
in interface InMemoryRepresentable
ASN1Primitive toDERObject()
toDERObject
in class ASN1Primitive
ASN1Primitive toDLObject()
toDLObject
in class ASN1Primitive
abstract void encode(ASN1OutputStream out) throws java.io.IOException
encode
in class ASN1Primitive
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object