|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ldaptive.asn1.AbstractDERType
org.ldaptive.asn1.OctetStringType
public class OctetStringType
Converts strings to and from their DER encoded format.
| Constructor Summary | |
|---|---|
OctetStringType(byte[] item)
Creates a new octet string type. |
|
OctetStringType(DERTag tag,
byte[] item)
Creates a new octet string type. |
|
OctetStringType(DERTag tag,
String item)
Creates a new octet string type. |
|
OctetStringType(String item)
Creates a new octet string type. |
|
| Method Summary | |
|---|---|
static String |
decode(ByteBuffer encoded)
Converts bytes in the buffer to a string by reading from the current position to the limit, which assumes the bytes of the string are in big-endian order. |
byte[] |
encode()
Encode this object into it's DER type. |
static byte[] |
toBytes(String s)
Converts the supplied string to a byte array using the UTF-8 encoding. |
| Methods inherited from class org.ldaptive.asn1.AbstractDERType |
|---|
encode, readBuffer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OctetStringType(String item)
item - to DER encodepublic OctetStringType(byte[] item)
item - to DER encode
public OctetStringType(DERTag tag,
String item)
tag - der tag associated with this typeitem - to DER encode
IllegalArgumentException - if the der tag is constructed
public OctetStringType(DERTag tag,
byte[] item)
tag - der tag associated with this typeitem - to DER encode
IllegalArgumentException - if the der tag is constructed| Method Detail |
|---|
public byte[] encode()
encode in interface DEREncoderpublic static String decode(ByteBuffer encoded)
encoded - buffer containing DER-encoded data where the buffer is
positioned at the start of string bytes and the limit is set beyond the
last byte of string data.
public static byte[] toBytes(String s)
s - to convert
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||