Oracle Security Developer Tools Crypto Java API Reference
10g (10.1.4.0.1)

B28171-01


oracle.security.crypto.asn1
Class ASN1Sequence

java.lang.Object
  extended byoracle.security.crypto.asn1.ASN1Sequence

All Implemented Interfaces:
ASN1Constructed, ASN1Object, ASN1TaggedObject, Streamable

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

An ASN.1 sequence.

The input may be any valid BER encoding of an ASN.1 sequence. The output is always a constructed, definite-length encoding of the sequence, and will be a DER encoding if and only if the output of every component is a DER encoding (provided DER requirements with respect to default components are obeyed).


Constructor Summary
ASN1Sequence()
          Makes a sequence with no components.
ASN1Sequence(ASN1Object o)
          Makes a sequence with one component.
ASN1Sequence(java.io.InputStream is)
           
ASN1Sequence(java.util.Vector el)
          Makes a sequence with the given components.

 

Method Summary
 void addElement(ASN1Object o)
           
 ASN1Object elementAt(int n)
           
 java.util.Vector elements()
          Returns the components of this ASN.1 sequence, as a vector, each element of which is an instance of ASN1Object.
 ASN1Object firstElement()
           
 byte[] getEncoded()
          Deprecated.  
 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.
static ASN1Header makeHeader(int len)
           
 void output(java.io.OutputStream os)
          Outputs this object to the specified output stream.
 int size()
          Returns the number of components of this ASN.1 sequence.
 java.lang.String toString()
           

 

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

 

Constructor Detail

ASN1Sequence

public ASN1Sequence()
Makes a sequence with no components.

ASN1Sequence

public ASN1Sequence(ASN1Object o)
Makes a sequence with one component.

ASN1Sequence

public ASN1Sequence(java.util.Vector el)
Makes a sequence with the given components.
Parameters:
el - A vector which contains the components. Each element must be an instance of ASN1Object.

ASN1Sequence

public ASN1Sequence(java.io.InputStream is)
             throws java.io.IOException

Method Detail

getHeader

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

elements

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

size

public int size()
Returns the number of components of this ASN.1 sequence.
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)

makeHeader

public static ASN1Header makeHeader(int len)

toString

public java.lang.String toString()

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

getEncoded

public byte[] getEncoded()
Deprecated.  

Oracle Security Developer Tools Crypto Java API Reference
10g (10.1.4.0.1)

B28171-01


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