pasn
Class ASN1OctetString

java.lang.Object
  extended by pasn.ASN1Object
      extended by pasn.ASN1UnformedOrderedObject<ASN1OctetStringValue>
          extended by pasn.ASN1OctetString
All Implemented Interfaces:
ASN1ConstructedObject, ASN1DefaultValuedObject, ASN1EncodingSpecificObject, ASN1GenericObject, ASN1PrimitiveObject<ASN1OctetStringValue>, ASN1PrimitiveOrConstructedObject<ASN1OctetStringValue>, ASN1Resetable

public class ASN1OctetString
extends ASN1UnformedOrderedObject<ASN1OctetStringValue>

An OCTET STRING is the most general ASN.1 holder for any list of octets. It may hold other encoded ASN.1 objects

Author:
N. Cottin - http://www.ncottin.net

Constructor Summary
ASN1OctetString()
           
 
Method Summary
 java.lang.String getASN1Name()
           
 java.util.Collection<ASN1PrimitiveObject> getConstructedValues(int maxSize)
           
 int getDefaultValueLength()
           
 int getValueLength()
           
 boolean hasDefaultValue()
           
 boolean hasValue()
           
 boolean isValueDefault()
           
 ASN1PrimitiveOrConstructedObject newInstance()
           
 void reset()
           Removes the value (or list or set of values) of this ASN.1 object.
 void setConstructedValues(java.util.Collection<ASN1PrimitiveOrConstructedObject> values)
           
 java.lang.String toString()
           
 void validateConstraints(ASN1OctetStringValue value)
           
 
Methods inherited from class pasn.ASN1UnformedOrderedObject
equals, getDefaultConstructedLength, getDefaultValue, getMaximumConstructedSize, getMaximumLength, getMinimumLength, getValue, getValueOrDefault, hasValueOrDefault, isPrimitive, setDecodedValue, setDefaultConstructedLength, setDefaultValue, setMaximumLength, setMinimumLength, setPrimitive, setValue
 
Methods inherited from class pasn.ASN1Object
getAsnClass, getSpecificEncoding, getSpecificEncoding, getType, hasSpecificEncodings, setSpecificEncoding
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface pasn.ASN1GenericObject
getAsnClass, getType
 
Methods inherited from interface pasn.ASN1EncodingSpecificObject
getSpecificEncoding, hasSpecificEncodings
 
Methods inherited from interface pasn.ASN1GenericObject
getAsnClass, getType
 
Methods inherited from interface pasn.ASN1EncodingSpecificObject
getSpecificEncoding, hasSpecificEncodings
 

Constructor Detail

ASN1OctetString

public ASN1OctetString()
Method Detail

getASN1Name

public final java.lang.String getASN1Name()

isValueDefault

public final boolean isValueDefault()

getConstructedValues

public final java.util.Collection<ASN1PrimitiveObject> getConstructedValues(int maxSize)
                                                                     throws ASN1ConstraintException
Throws:
ASN1ConstraintException

reset

public final void reset()
Description copied from interface: ASN1Resetable

Removes the value (or list or set of values) of this ASN.1 object. This applies to simple and structured ASN.1 objects


hasValue

public final boolean hasValue()

hasDefaultValue

public final boolean hasDefaultValue()

validateConstraints

public final void validateConstraints(ASN1OctetStringValue value)
                               throws ASN1ConstraintException
Throws:
ASN1ConstraintException

getValueLength

public final int getValueLength()
Returns:
The number of octets of the current value or 0 if no value

getDefaultValueLength

public final int getDefaultValueLength()
Returns:
The number of octets of the current default value or 0 if no default value

setConstructedValues

public final void setConstructedValues(java.util.Collection<ASN1PrimitiveOrConstructedObject> values)
                                throws ASN1DecodingException,
                                       ASN1ConstraintException,
                                       java.lang.ClassCastException
Throws:
ASN1DecodingException
ASN1ConstraintException
java.lang.ClassCastException

newInstance

public final ASN1PrimitiveOrConstructedObject newInstance()

toString

public final java.lang.String toString()
Overrides:
toString in class java.lang.Object