pasn
Class ASN1UnformedOrderedObject<T>
java.lang.Object
pasn.ASN1Object
pasn.ASN1UnformedOrderedObject<T>
- Type Parameters:
T
-
- All Implemented Interfaces:
- ASN1ConstructedObject, ASN1DefaultValuedObject, ASN1EncodingSpecificObject, ASN1GenericObject, ASN1PrimitiveObject<T>, ASN1PrimitiveOrConstructedObject<T>, ASN1Resetable
- Direct Known Subclasses:
- ASN1BitString, ASN1OctetString
public abstract class ASN1UnformedOrderedObject<T>
- extends ASN1Object
- implements ASN1PrimitiveOrConstructedObject<T>
- Author:
- ncottin
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ASN1UnformedOrderedObject
public ASN1UnformedOrderedObject(int type,
boolean primitive)
setPrimitive
public final void setPrimitive(boolean primitive)
isPrimitive
public final boolean isPrimitive()
- Specified by:
isPrimitive
in interface ASN1PrimitiveOrConstructedObject<T>
setMinimumLength
public final void setMinimumLength(int minLength)
Set the minimum number of bits or octets to initialize this object with
- Parameters:
minLength
- A positive value indicates the minimum number of bits or
octets allowed. efault value is zero (0). A negative value
disables this constraint
getMinimumLength
public final int getMinimumLength()
setMaximumLength
public final void setMaximumLength(int maxLength)
Set the maximum number of bits or octets to initialize this object with
- Parameters:
maxLength
- A positive value indicates the maximum number of bits or
octets allowed. This value must be greater than minimum length to be
taken into account. A strictly negative value disables this constraint
getMaximumLength
public final int getMaximumLength()
setValue
public final void setValue(T value)
throws ASN1ConstraintException
- Description copied from interface:
ASN1PrimitiveObject
Initialializes this ASN.1 object with an appropriate value
- Specified by:
setValue
in interface ASN1PrimitiveObject<T>
- Parameters:
value
- A possibly null value
- Throws:
ASN1ConstraintException
getValue
public final T getValue()
- Specified by:
getValue
in interface ASN1PrimitiveObject<T>
setDecodedValue
public final void setDecodedValue(java.lang.Object value)
throws ASN1FormatException,
ASN1ConstraintException
- Specified by:
setDecodedValue
in interface ASN1PrimitiveObject<T>
- Throws:
ASN1FormatException
ASN1ConstraintException
setDefaultValue
public final void setDefaultValue(T value)
throws ASN1ConstraintException
- Throws:
ASN1ConstraintException
getDefaultValue
public final T getDefaultValue()
- Specified by:
getDefaultValue
in interface ASN1PrimitiveObject<T>
getValueOrDefault
public final T getValueOrDefault()
- Specified by:
getValueOrDefault
in interface ASN1PrimitiveObject<T>
hasValueOrDefault
public final boolean hasValueOrDefault()
- Specified by:
hasValueOrDefault
in interface ASN1DefaultValuedObject
getDefaultConstructedLength
public final int getDefaultConstructedLength()
- Returns:
- the defaultConstructedLength
setDefaultConstructedLength
public final void setDefaultConstructedLength(int defaultConstructedLength)
- Parameters:
defaultConstructedLength
- the defaultConstructedLength to set
getMaximumConstructedSize
public final int getMaximumConstructedSize(int valueSize,
int maxSize)
equals
public final boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object