Skip navigation links

Oracle Fusion Middleware Crypto Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10668-04


oracle.security.crypto.asn1
Class ASN1Set

java.lang.Object
  extended by oracle.security.crypto.asn1.ASN1Set

All Implemented Interfaces:
ASN1Constructed, ASN1Object, ASN1TaggedObject, Streamable

public class ASN1Set
extends java.lang.Object
implements ASN1TaggedObject, ASN1Constructed

An ASN.1 set.

The input may be any valid BER encoding of an ASN.1 set. The output is always a constructed, definite-length encoding of the set.


Field Summary
static int BER
          An encoding type.
static int DER_SET
          An encoding type.
static int DER_SET_OF
          An encoding type.

 

Constructor Summary
ASN1Set()
          Makes a new set with no elements.
ASN1Set(ASN1Object o)
          Makes a set with one element.
ASN1Set(java.util.Enumeration<ASN1Object> e)
          Deprecated. 
ASN1Set(java.io.InputStream is)
           
ASN1Set(java.util.List<? extends ASN1Object> el)
          Makes a set with the given elements.
ASN1Set(java.util.Vector<? extends ASN1Object> el)
          Deprecated. Use ASN1Set(List)

 

Method Summary
 void addElement(ASN1Object o)
           
 ASN1Object elementAt(int n)
           
 java.util.Vector<ASN1Object> elements()
          Deprecated. 
 java.util.ArrayList<ASN1Object> elementsAsList()
           
 ASN1Object firstElement()
           
 int getEncodingType()
           
 ASN1Header getHeader()
           
 void input(java.io.InputStream is)
          Inputs this object from the specified input stream.
 ASN1Object lastElement()
           
 int length()
          Length of this object's encoding.
 void output(java.io.OutputStream os)
          Outputs this object to the specified output stream.
 void setEncodingType(int encodingType)
          Sets the encoding type to one of BER, DER_SET or DER_SET_OF (default is DER_SET_OF).
 int size()
          Returns the number of components of this ASN.1 set.
 java.lang.String toString()
           

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Field Detail

BER

public static final int BER
An encoding type.
See Also:
Constant Field Values

DER_SET

public static final int DER_SET
An encoding type.
See Also:
Constant Field Values

DER_SET_OF

public static final int DER_SET_OF
An encoding type.
See Also:
Constant Field Values

Constructor Detail

ASN1Set

public ASN1Set()
Makes a new set with no elements.

ASN1Set

public ASN1Set(ASN1Object o)
Makes a set with one element.

ASN1Set

public ASN1Set(java.util.Vector<? extends ASN1Object> el)
Deprecated. Use ASN1Set(List)
Makes a set with the given elements.
Parameters:
el - A vector which contains the components. Each element must be an instance of ASN1Object.

ASN1Set

public ASN1Set(java.util.List<? extends ASN1Object> el)
Makes a set with the given elements.
Parameters:
el - A vector which contains the components. Each element must be an instance of ASN1Object.

ASN1Set

@Deprecated
public ASN1Set(java.util.Enumeration<ASN1Object> e)
Deprecated. 

ASN1Set

public ASN1Set(java.io.InputStream is)
        throws java.io.IOException
Throws:
java.io.IOException

Method Detail

getHeader

public ASN1Header getHeader()
Specified by:
getHeader in interface ASN1TaggedObject

elements

@Deprecated
public java.util.Vector<ASN1Object> elements()
Deprecated. 
Returns the components of this ASN.1 set, as a vector, each element of which is an instance of ASN1Object.
Specified by:
elements in interface ASN1Constructed

elementsAsList

public java.util.ArrayList<ASN1Object> elementsAsList()
Specified by:
elementsAsList in interface ASN1Constructed

size

public int size()
Returns the number of components of this ASN.1 set.
Specified by:
size in interface ASN1Constructed

elementAt

public ASN1Object elementAt(int n)
Specified by:
elementAt in interface ASN1Constructed

firstElement

public ASN1Object firstElement()

lastElement

public ASN1Object lastElement()

addElement

public void addElement(ASN1Object o)

setEncodingType

public void setEncodingType(int encodingType)
Sets the encoding type to one of BER, DER_SET or DER_SET_OF (default is DER_SET_OF).

getEncodingType

public int getEncodingType()

toString

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

input

public void input(java.io.InputStream is)
           throws java.io.IOException
Description copied from interface: Streamable
Inputs this object from the specified input stream.
Specified by:
input in interface Streamable
Throws:
java.io.IOException

length

public int length()
Description copied from interface: Streamable
Length of this object's encoding.
Specified by:
length in interface Streamable

output

public void output(java.io.OutputStream os)
            throws java.io.IOException
Description copied from interface: Streamable
Outputs this object to the specified output stream.
Specified by:
output in interface Streamable
Throws:
java.io.IOException

Skip navigation links

Oracle Fusion Middleware Crypto Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10668-04


Copyright © 2005, 2011 , Oracle. All rights reserved.