|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgnu.inet.ldap.BEREncoder
public class BEREncoder
Utility class to construct BER-encoded data.
Constructor Summary | |
---|---|
BEREncoder(boolean utf8)
Constructor. |
|
BEREncoder(boolean utf8,
int initialSize)
Constructor. |
Method Summary | |
---|---|
void |
append(boolean value)
Appends a boolean value. |
void |
append(boolean value,
int code)
Appends a boolean value with the specified ASN.1 type code. |
void |
append(byte[] bytes)
Appends an octetstring value. |
void |
append(byte[] bytes,
int code)
Appends an octetstring value with the specified ASN.1 type code. |
void |
append(int value)
Appends an integer value. |
void |
append(int value,
int code)
Appends an integer value with the specified ASN.1 type code. |
void |
append(java.lang.String value)
Appends a string value. |
void |
append(java.lang.String value,
int code)
Appends a string value with the specified ASN.1 type code. |
void |
appendFilter(java.lang.String filter)
Appends an RFC2254 search filter to this encoder. |
void |
appendNull()
Appends a BER NULL value. |
void |
reset()
Reset this encoder for reuse. |
int |
size()
Returns the current size of the encoded data. |
byte[] |
toByteArray()
Returns the encoded data. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BEREncoder(boolean utf8)
utf
- whether to use UTF-8 for encoding stringspublic BEREncoder(boolean utf8, int initialSize)
utf
- whether to use UTF-8 for encoding stringsinitialSize
- the initial buffer sizeMethod Detail |
---|
public void reset()
public int size()
public byte[] toByteArray()
public void append(boolean value)
value
- the valuepublic void append(boolean value, int code)
value
- the valuecode
- the type codepublic void append(int value)
value
- the valuepublic void append(int value, int code)
value
- the valuecode
- the type codepublic void append(byte[] bytes) throws BERException
bytes
- the value
BERException
public void append(byte[] bytes, int code) throws BERException
bytes
- the valuecode
- the type code
BERException
public void append(java.lang.String value) throws BERException
value
- the value
BERException
public void append(java.lang.String value, int code) throws BERException
value
- the valuecode
- the type code
BERException
public void appendNull()
public void appendFilter(java.lang.String filter) throws BERException
filter
- the filter expression
BERException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |