Skip navigation links

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

E10696-04


oracle.security.crypto.asn1
Class ASN1GenericPrimitive

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

All Implemented Interfaces:
ASN1Object, ASN1TaggedObject, Streamable

public class ASN1GenericPrimitive
extends java.lang.Object
implements ASN1TaggedObject

A class for ASN.1 DER primitive types with an unrecognized tag or a non-universal class.


Constructor Summary
ASN1GenericPrimitive(ASN1Object o, int tag)
          Creates a new ASN.1 primitive object, with the specified tag and the context-specific tag class, which has the given ASN.1 object as its underlying value.
ASN1GenericPrimitive(ASN1Object o, int tag, int tagClass)
          Creates a new ASN.1 primitive object, with the specified tag and tag class, which has the given ASN.1 object as its underlying value.
ASN1GenericPrimitive(byte[] body, int tag)
          Creates a new ASN.1 generic primitive object, with the given tag and the context-specific tag class.
ASN1GenericPrimitive(byte[] body, int tag, int tagClass)
          Creates a new ASN.1 generic primitive object, with the given tag and tag class.
ASN1GenericPrimitive(java.io.InputStream is)
           
ASN1GenericPrimitive(java.io.InputStream is, int tag)
           
ASN1GenericPrimitive(java.io.InputStream is, int tag, int tagClass)
           

 

Method Summary
 byte[] getBody()
           
 ASN1Header getHeader()
           
 int getTag()
           
 int getTagClass()
           
 void input(java.io.InputStream is)
          Inputs this object from the specified input stream.
 int length()
          Length of this object's encoding.
 void output(java.io.OutputStream os)
          Outputs this object to the specified output stream.
 ASN1Object withTag(int tag)
          Creates a new ASN.1 object, which has the same body as this one, but with the given tag and UNIVERSAL class.
 ASN1Object withTag(int tag, int tagClass)
          Creates a new ASN.1 object, which has the same body as this one, but with the given tag and tag class.

 

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

 

Constructor Detail

ASN1GenericPrimitive

public ASN1GenericPrimitive(byte[] body,
                            int tag)
Creates a new ASN.1 generic primitive object, with the given tag and the context-specific tag class.

ASN1GenericPrimitive

public ASN1GenericPrimitive(byte[] body,
                            int tag,
                            int tagClass)
Creates a new ASN.1 generic primitive object, with the given tag and tag class.

ASN1GenericPrimitive

public ASN1GenericPrimitive(ASN1Object o,
                            int tag)
Creates a new ASN.1 primitive object, with the specified tag and the context-specific tag class, which has the given ASN.1 object as its underlying value.
Parameters:
o - the underlying value, which must be a primitive-encoded ASN.1 object
tag - the tag
tagClass - the tag class

ASN1GenericPrimitive

public ASN1GenericPrimitive(ASN1Object o,
                            int tag,
                            int tagClass)
Creates a new ASN.1 primitive object, with the specified tag and tag class, which has the given ASN.1 object as its underlying value.
Parameters:
o - the underlying value, which must be a primitive-encoded ASN.1 object
tag - the tag
tagClass - the tag class

ASN1GenericPrimitive

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

ASN1GenericPrimitive

public ASN1GenericPrimitive(java.io.InputStream is,
                            int tag)
                     throws java.io.IOException
Throws:
java.io.IOException

ASN1GenericPrimitive

public ASN1GenericPrimitive(java.io.InputStream is,
                            int tag,
                            int tagClass)
                     throws java.io.IOException
Throws:
java.io.IOException

Method Detail

getHeader

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

getTag

public int getTag()

getTagClass

public int getTagClass()

getBody

public byte[] getBody()

withTag

public ASN1Object withTag(int tag)
                   throws java.io.IOException
Creates a new ASN.1 object, which has the same body as this one, but with the given tag and UNIVERSAL class.
Throws:
java.io.IOException

withTag

public ASN1Object withTag(int tag,
                          int tagClass)
                   throws java.io.IOException
Creates a new ASN.1 object, which has the same body as this one, but with the given tag and tag class.
Throws:
java.io.IOException

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

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

length

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

Skip navigation links

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

E10696-04


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