public class TransitedEncoding
extends java.lang.Object
implements org.apache.directory.api.asn1.Asn1Object
-- encoded Transited field
TransitedEncoding ::= SEQUENCE {
tr-type [0] Int32 -- must be registered --,
contents [1] OCTET STRING
}
| Modifier and Type | Field and Description |
|---|---|
private byte[] |
contents
The transited data
|
private int |
contentsLength |
private static boolean |
IS_DEBUG
Speedup for logs
|
private static org.slf4j.Logger |
log
The logger
|
private int |
transitedEncodingLength |
private TransitedEncodingType |
trType
The transited type.
|
private int |
trTypeLength |
| Constructor and Description |
|---|
TransitedEncoding()
Creates a new instance of TransitedEncoding.
|
| Modifier and Type | Method and Description |
|---|---|
int |
computeLength()
Compute the TransitedEncoding length
|
java.nio.ByteBuffer |
encode(java.nio.ByteBuffer buffer)
Encode the TransitedEncoding message to a PDU.
|
boolean |
equals(java.lang.Object obj) |
byte[] |
getContents()
Returns the contents.
|
TransitedEncodingType |
getTrType()
Returns the
TransitedEncodingType. |
int |
hashCode() |
void |
setContents(byte[] contents)
Set the contents
|
void |
setTrType(TransitedEncodingType trType)
Set the transited encoding type
|
java.lang.String |
toString() |
private static final org.slf4j.Logger log
private static final boolean IS_DEBUG
private TransitedEncodingType trType
private byte[] contents
private int trTypeLength
private int contentsLength
private int transitedEncodingLength
public TransitedEncoding()
public byte[] getContents()
public void setContents(byte[] contents)
contents - The contentspublic TransitedEncodingType getTrType()
TransitedEncodingType.TransitedEncodingType.public void setTrType(TransitedEncodingType trType)
trType - The transited encoding typepublic int computeLength()
TransitedEncoding :
0x30 L1 TransitedEncoding
|
+--> 0xA0 L2 trType tag
| |
| +--> 0x02 L2-1 trType (int)
|
+--> 0xA1 L3 contents tag
|
+--> 0x04 L3-1 contents (OCTET STRING)
where L1 = L2 + lenght(0xA0) + length(L2) +
L3 + lenght(0xA1) + length(L3)
and
L2 = L2-1 + length(0x02) + length( L2-1)
L3 = L3-1 + length(0x04) + length( L3-1)
computeLength in interface org.apache.directory.api.asn1.Asn1Objectpublic java.nio.ByteBuffer encode(java.nio.ByteBuffer buffer)
throws org.apache.directory.api.asn1.EncoderException
encode in interface org.apache.directory.api.asn1.Asn1Objectbuffer - The buffer where to put the PDU. It should have been allocated
before, with the right size.org.apache.directory.api.asn1.EncoderExceptionpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.ObjectObject.toString()