Package com.oss.asn1
Class SequenceOfDeferred<T extends AbstractData>
java.lang.Object
com.oss.asn1.AbstractData
com.oss.asn1.AbstractContainer
com.oss.asn1.SequenceOf<T>
com.oss.asn1.SequenceOfDeferred<T>
- Type Parameters:
T
- type of the SEQUENCE OF element value
- All Implemented Interfaces:
com.oss.asn1.Sizeable
,Serializable
,Cloneable
,Iterable<T>
The SetOfDeferred class represents the ASN.1 SEQUENCE OF type with a component
type that has --<ASN1.DeferDecoding>-- directive.
- Since:
- ASN.1/Java 7.0
- See Also:
-
Field Summary
Fields inherited from class com.oss.asn1.AbstractData
EQUALS, GREATER_THAN, LESS_THAN
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add an Element to this SEQUENCE OF.Return SEQUENCE OF as a collection of elements.void
Decode and set the decoded form of deferred component.void
Encode the decoded form of deferred component and set its encoded form.get
(int atIndex) Get an Element from this SEQUENCE OF.byte[]
getEncoded
(int atIndex) Return encoding of deferred component.void
Insert an Element into this SEQUENCE OF at specified index.void
Remove an Element from this SEQUENCE OF.void
Set (replace) an Element in the SEQUENCE OF.Methods inherited from class com.oss.asn1.SequenceOf
equalTo, iterator
Methods inherited from class com.oss.asn1.AbstractContainer
clone, delete, elements, getSize, hashCode, remove, removeAllElements, size
Methods inherited from class com.oss.asn1.AbstractData
equals, getTypeInfo, isEncodable, isPDU, isValid, toString, toString
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
add
Add an Element to this SEQUENCE OF.- Overrides:
add
in classSequenceOf<T extends AbstractData>
- Parameters:
element
- an element to add to this SEQUENCE OF
-
set
Set (replace) an Element in the SEQUENCE OF.- Overrides:
set
in classSequenceOf<T extends AbstractData>
- Parameters:
element
- new element to set.atIndex
- index of the replaced element.
-
get
Get an Element from this SEQUENCE OF.- Overrides:
get
in classSequenceOf<T extends AbstractData>
- Parameters:
atIndex
- index of the element.- Returns:
- element specified by the index
-
insert
Insert an Element into this SEQUENCE OF at specified index.- Overrides:
insert
in classSequenceOf<T extends AbstractData>
- Parameters:
element
- element to insert.atIndex
- index of inserted element.
-
remove
Remove an Element from this SEQUENCE OF.- Overrides:
remove
in classSequenceOf<T extends AbstractData>
- Parameters:
element
- element to remove.
-
getEncoded
public byte[] getEncoded(int atIndex) Return encoding of deferred component.- Parameters:
atIndex
- index of the element.- Returns:
- encoding of the element
-
decode
public void decode(Coder coder, int atIndex) throws DecodeNotSupportedException, DecodeFailedException Decode and set the decoded form of deferred component.- Parameters:
coder
- coder object.atIndex
- index of the element to decode.- Throws:
DecodeNotSupportedException
- if decoding is not supported for the specified element.DecodeFailedException
- if an error occurs while decoding.
-
encode
public void encode(Coder coder, int atIndex) throws EncodeNotSupportedException, EncodeFailedException Encode the decoded form of deferred component and set its encoded form.- Parameters:
coder
- coder object.atIndex
- index of the element to encode.- Throws:
EncodeNotSupportedException
- if encoding is not supported for the specified element.EncodeFailedException
- if an error occurs while encoding.
-
asCollection
Return SEQUENCE OF as a collection of elements. The method is not supported and will throw UnsupportedOperationException.- Overrides:
asCollection
in classSequenceOf<T extends AbstractData>
- Returns:
- collection of elements.
-