|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.shared.asn1.AbstractAsn1Object
org.apache.directory.shared.kerberos.components.TransitedEncoding
public class TransitedEncoding
The TransitedEncoding structure. The ASN.1 grammar is :
-- encoded Transited field
TransitedEncoding ::= SEQUENCE {
tr-type [0] Int32 -- must be registered --,
contents [1] OCTET STRING
}
| Constructor Summary | |
|---|---|
TransitedEncoding()
Creates a new instance of TransitedEncoding. |
|
| Method Summary | |
|---|---|
int |
computeLength()
Compute the TransitedEncoding length |
ByteBuffer |
encode(ByteBuffer buffer)
Encode the TransitedEncoding message to a PDU. |
boolean |
equals(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 |
String |
toString()
|
| Methods inherited from class org.apache.directory.shared.asn1.AbstractAsn1Object |
|---|
addLength, getCurrentLength, getExpectedLength, getParent, getTlvId, setCurrentLength, setExpectedLength, setParent |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TransitedEncoding()
| Method Detail |
|---|
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)
public ByteBuffer encode(ByteBuffer buffer)
throws org.apache.directory.shared.asn1.EncoderException
encode in interface org.apache.directory.shared.asn1.Asn1Objectencode in class org.apache.directory.shared.asn1.AbstractAsn1Objectbuffer - The buffer where to put the PDU. It should have been allocated
before, with the right size.
org.apache.directory.shared.asn1.EncoderExceptionpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic String toString()
toString in class ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||