|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.asn1new.primitives.OctetString
Implement the Octet String primitive type.
Field Summary | |
private byte[] |
bytes
The string is stored in a byte array |
private static int |
DEFAULT_LENGTH
The default length of an octet string |
static OctetString |
EMPTY_STRING
A null OctetString |
private boolean |
isStreamed
Tells if the OctetString is streamed or not |
private static long |
serialVersionUID
|
static boolean |
STREAMED
A flag to mark the OctetString as Streamed (for OctetString larger than 1024 chars) |
Constructor Summary | |
OctetString(byte[] bytes)
Creates a OctetString with a value. |
|
OctetString(int length)
Creates a OctetString with a specific length. |
|
OctetString(int length,
boolean isStreamed)
Creates a streamed OctetString with a specific length. |
Method Summary | |
int |
getNbBytes()
|
byte[] |
getValue()
Get the data stored into the OctetString |
boolean |
isStreamed()
Tells if the OctetString is streamed or not |
void |
setData(byte[] bytes)
Set a new octetString in the OctetString. |
java.lang.String |
toString()
Return a native String representation of the OctetString. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final long serialVersionUID
public static final OctetString EMPTY_STRING
public static final boolean STREAMED
private static final int DEFAULT_LENGTH
private boolean isStreamed
private byte[] bytes
Constructor Detail |
public OctetString(int length)
length
- The OctetString lengthpublic OctetString(int length, boolean isStreamed)
length
- The OctetString lengthisStreamed
- Tells if the OctetString must be streamed or notpublic OctetString(byte[] bytes)
bytes
- The value to store.Method Detail |
public void setData(byte[] bytes)
bytes
- The string to storepublic byte[] getValue()
public java.lang.String toString()
public boolean isStreamed()
true
if the OctetString is streamed.public int getNbBytes()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |