codec.asn1
Class ASN1AbstractCollectionOf

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.ArrayList
                    |
                    +--codec.asn1.ASN1AbstractCollection
                          |
                          +--codec.asn1.ASN1AbstractCollectionOf
All Implemented Interfaces:
ASN1Collection, ASN1CollectionOf, ASN1Type, Cloneable, Collection, Externalizable, List, Serializable

public abstract class ASN1AbstractCollectionOf
extends ASN1AbstractCollection
implements ASN1CollectionOf

Represents the ASN.1 SEQUENCE OF and SET OF types in a general way.

Version:
"$Id: ASN1AbstractCollectionOf.java,v 1.2 2005/03/22 16:21:17 flautens Exp $"
Author:
Volker Roth
See Also:
Serialized Form

Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
ASN1AbstractCollectionOf(Class type)
          Creates an instance
ASN1AbstractCollectionOf(int capacity, Class type)
          Creates an instance with the given capacity.
 
Method Summary
 void decode(Decoder dec)
          Reads this collection from the given Decoder.
 Class getElementType()
          Returns the Java class representing the ASN.1 type of the elements in this collection.
abstract  int getTag()
          Abstract method declarations.
 
Methods inherited from class codec.asn1.ASN1AbstractCollection
checkConstraints, encode, getCollection, getConstraint, getTagClass, getValue, isExplicit, isOptional, isType, readExternal, setConstraint, setExplicit, setOptional, toString, writeExternal
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, remove, removeAll, retainAll
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface codec.asn1.ASN1CollectionOf
newElement
 
Methods inherited from interface codec.asn1.ASN1Collection
getCollection
 
Methods inherited from interface codec.asn1.ASN1Type
checkConstraints, encode, getConstraint, getTagClass, getValue, isExplicit, isOptional, isType, setConstraint, setExplicit, setOptional
 
Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, remove, removeAll, retainAll, subList
 

Constructor Detail

ASN1AbstractCollectionOf

public ASN1AbstractCollectionOf(int capacity,
                                Class type)
Creates an instance with the given capacity.
Parameters:
capacity - The capacity.
type - The class managed by this ASN1AbstractCollectionOf

ASN1AbstractCollectionOf

public ASN1AbstractCollectionOf(Class type)
Creates an instance
Parameters:
type - The class managed by this ASN1AbstractCollectionOf
Method Detail

decode

public void decode(Decoder dec)
            throws ASN1Exception,
                   IOException
Reads this collection from the given Decoder. This type is initialized with the decoded data. The components of the decoded collection must match the components of this collection. If they do then the components are also initialized with the decoded values. Otherwise an exception is thrown.
Specified by:
decode in interface ASN1Type
Overrides:
decode in class ASN1AbstractCollection
Parameters:
dec - The decoder to read from.

getElementType

public Class getElementType()
Returns the Java class representing the ASN.1 type of the elements in this collection.
Specified by:
getElementType in interface ASN1CollectionOf
Returns:
The ASN.1 type of the elements in this collection.

getTag

public abstract int getTag()
Abstract method declarations.
Specified by:
getTag in interface ASN1Type
Overrides:
getTag in class ASN1AbstractCollection
Returns:
corresponding ASN1 tag


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.