Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Security Developer Tools Crypto Java API Reference 10g Release 3 (10.1.3) B25378-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.security.crypto.asn1
Class ASN1GenericConstructed

`java.lang.Object
oracle.security.crypto.asn1.ASN1GenericConstructed`

All Implemented Interfaces:
  ASN1Constructed, ASN1Object, ASN1TaggedObject, Streamable

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

A class for ASN.1 DER constructed types with an unrecognized tag or a non-universal tag class (e.g., implicitly tagged sequences and sets, or explicitly tagged wrappers).

See Also:
  `ASN1Utils.addImplicitTag(oracle.security.crypto.asn1.ASN1Object, int)`

Constructor Summary
`ASN1GenericConstructed(ASN1Object o, int tag)` Construct an EXPLICIT wrapper around an object with the given tag and the context-specific tag class.
`ASN1GenericConstructed(ASN1Object o, int tag, int tagClass)` Construct an EXPLICIT wrapper around an object with the given tag and tag class.
`ASN1GenericConstructed(byte[] encoded)`
`ASN1GenericConstructed(java.io.InputStream is)`
`ASN1GenericConstructed(int tag)` Creates a new, empty ASN.1 constructed object (that is, one with no components), which has the given tag and the context-specific tag class.
`ASN1GenericConstructed(int tag, int tagClass)` Creates a new, empty ASN.1 structure (that is, with no components), with the given tag and tag class.
`ASN1GenericConstructed(java.util.Vector el, int tag)` Creates a new ASN.1 constructed object, with the given components vector and tag, and the context-specific tag class.
`ASN1GenericConstructed(java.util.Vector el, int tag, int tagClass)` Creates a new ASN.1 constructed object, with the given components vector, tag, and tag class.

Method Summary
`void` | `addElement(ASN1Object o)` Appends the given object to this ASN.1 constructed object, making it the last component.
`ASN1Object` | `elementAt(int n)` Returns the component of this ASN.1 constructed object at the specified index.
`java.util.Vector` | `elements()` Returns the components of this ASN.1 constructed object, as a vector, each element of which is an instance of `ASN1Object`.
`ASN1Object` | `firstElement()` Returns the first component of this ASN.1 constructed object.
`int` | `getEncodingType()` Returns the encoding type.
`ASN1Header` | `getHeader()`
`int` | `getTag()`
`int` | `getTagClass()`
`void` | `input(java.io.InputStream is)` Inputs this object from the specified input stream.
`ASN1Object` | `lastElement()` Returns the last component of this ASN.1 constructed object.
`int` | `length()` Length of this object's encoding.
`void` | `output(java.io.OutputStream os)` Outputs this object to the specified output stream.
`static void` | `outputValue(java.io.OutputStream os, java.util.Vector elements, int tag)`
`static void` | `outputValue(java.io.OutputStream os, java.util.Vector elements, int tag, int tagClass)`
`void` | `setEncodingType(int encodingType)` Set the encoding type.
`int` | `size()` Returns the number of components of this ASN.1 constructed object.
`ASN1Sequence` | `toSequence()` Deprecated.
`java.lang.String` | `toString()`

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

Constructor Detail

### ASN1GenericConstructed

    public ASN1GenericConstructed(int tag)

  Creates a new, empty ASN.1 constructed object (that is, one with no components), which has the given tag and the context-specific tag class.

### ASN1GenericConstructed

    public ASN1GenericConstructed(int tag,
                                  int tagClass)

  Creates a new, empty ASN.1 structure (that is, with no components), with the given tag and tag class.

### ASN1GenericConstructed

    public ASN1GenericConstructed(ASN1Object o,
                                  int tag)

  Construct an EXPLICIT wrapper around an object with the given tag and the context-specific tag class.

### ASN1GenericConstructed

    public ASN1GenericConstructed(ASN1Object o,
                                  int tag,
                                  int tagClass)

  Construct an EXPLICIT wrapper around an object with the given tag and tag class.

### ASN1GenericConstructed

    public ASN1GenericConstructed(java.util.Vector el,
                                  int tag)

  Creates a new ASN.1 constructed object, with the given components vector and tag, and the context-specific tag class. This constructor may be used to perform implicit tagging.

### ASN1GenericConstructed

    public ASN1GenericConstructed(java.util.Vector el,
                                  int tag,
                                  int tagClass)

  Creates a new ASN.1 constructed object, with the given components vector, tag, and tag class. This constructor may be used to perform implicit tagging.
Parameters:
  `el` - A vector which contains the components. Each element must be an instance of `ASN1Object`.

### ASN1GenericConstructed

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

### ASN1GenericConstructed

    public ASN1GenericConstructed(byte[] encoded)
                           throws java.io.IOException

Method Detail

### getHeader

    public ASN1Header getHeader()

  Specified by:
    `getHeader` in interface `ASN1TaggedObject`

### getTag

    public int getTag()

### getTagClass

    public int getTagClass()

### elements

    public java.util.Vector elements()

  Returns the components of this ASN.1 constructed object, 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 constructed object.
  Specified by:
    `size` in interface `ASN1Constructed`

### elementAt

    public ASN1Object elementAt(int n)

  Returns the component of this ASN.1 constructed object at the specified index.
  Specified by:
    `elementAt` in interface `ASN1Constructed`

### firstElement

    public ASN1Object firstElement()

  Returns the first component of this ASN.1 constructed object.

### lastElement

    public ASN1Object lastElement()

  Returns the last component of this ASN.1 constructed object.

### addElement

    public void addElement(ASN1Object o)

  Appends the given object to this ASN.1 constructed object, making it the last component.

### setEncodingType

    public void setEncodingType(int encodingType)

  Set the encoding type. This is only needed if this object is a representation of an implicitly tagged set and you are using a DER encoding. Use one of the constants defined in ASN1Set: BER, DER_SET, DER_SET_OF. The default is BER, which means no sorting is done (this is appropriate for implicitly tagged DER sequences and explicitly tagged objects).

### getEncodingType

    public int getEncodingType()

  Returns the encoding type.
  See Also:
    `setEncodingType(int)`

### toSequence

    public ASN1Sequence toSequence()

  Deprecated.

### 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`

### outputValue

    public static void outputValue(java.io.OutputStream os,
                                   java.util.Vector elements,
                                   int tag)
                            throws java.io.IOException

  Throws:
    `java.io.IOException`

### outputValue

    public static void outputValue(java.io.OutputStream os,
                                   java.util.Vector elements,
                                   int tag,
                                   int tagClass)
                            throws java.io.IOException

  Throws:
    `java.io.IOException`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Security Developer Tools Crypto Java API Reference 10g Release 3 (10.1.3) B25378-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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