org.apache.directory.shared.kerberos.components
Class TypedData

java.lang.Object
  extended by org.apache.directory.shared.asn1.AbstractAsn1Object
      extended by org.apache.directory.shared.kerberos.components.TypedData
All Implemented Interfaces:
org.apache.directory.shared.asn1.Asn1Object

public class TypedData
extends org.apache.directory.shared.asn1.AbstractAsn1Object

TYPED-DATA ::= SEQUENCE SIZE (1..MAX) OF SEQUENCE { data-type [0] Int32, data-value [1] OCTET STRING OPTIONAL }

Author:
Apache Directory Project

Nested Class Summary
 class TypedData.TD
           
 
Constructor Summary
TypedData()
           
 
Method Summary
 int computeLength()
          Compute the TypedData length
 void createNewTD()
          Create a new currentTD
 ByteBuffer encode(ByteBuffer buffer)
          
 int getCurrentDataType()
           
 byte[] getCurrentDataValue()
           
 TypedData.TD getCurrentTD()
           
 List<TypedData.TD> getTypedData()
           
 void setCurrentDataType(int tdType)
          Set the current TD type
 void setCurrentDataValue(byte[] tdData)
          Set the current TD data
 String toString()
           
 String toString(String tabs)
           
 
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, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TypedData

public TypedData()
Method Detail

getCurrentDataType

public int getCurrentDataType()
Returns:
the currentTD type

setCurrentDataType

public void setCurrentDataType(int tdType)
Set the current TD type


getCurrentDataValue

public byte[] getCurrentDataValue()
Returns:
the currentTD data

setCurrentDataValue

public void setCurrentDataValue(byte[] tdData)
Set the current TD data


getCurrentTD

public TypedData.TD getCurrentTD()
Returns:
the currentTD

createNewTD

public void createNewTD()
Create a new currentTD


getTypedData

public List<TypedData.TD> getTypedData()
Returns:
the TypedData

computeLength

public int computeLength()
Compute the TypedData length
 0x30 L1 TypedData sequence
  |
  +-- 0x30 L2 The TD sequence
       |
       +--> 0xA0 L3 tdType tag
       |     |
       |     +--> 0x02 L3-2 tdType (int)
       |
       +--> [0xA1 L4 tdData tag
             |
             +--> 0x04 L4-2 tdData (OCTET STRING)]
 


encode

public ByteBuffer encode(ByteBuffer buffer)
                  throws org.apache.directory.shared.asn1.EncoderException

Specified by:
encode in interface org.apache.directory.shared.asn1.Asn1Object
Overrides:
encode in class org.apache.directory.shared.asn1.AbstractAsn1Object
Throws:
org.apache.directory.shared.asn1.EncoderException

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

toString

public String toString(String tabs)
See Also:
Object.toString()


Copyright © 2003-2012 The Apache Software Foundation. All Rights Reserved.