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

B28171-01


oracle.security.crypto.asn1
Class ASN1String

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

All Implemented Interfaces:
ASN1Object, ASN1TaggedObject, Streamable

public class ASN1String
extends java.lang.Object
implements ASN1TaggedObject

Various universal ASN.1 string types.

The following types are supported.

Of these, only BMP_STRING and UTF_STRING allow the representation of Unicode (16-bit) characters. All others treat strings consisting of 8-bit characters only.

The default is IA5STRING.

The input may be any valid BER encoding of one of the above types. The output is always a DER encoding.


Constructor Summary
ASN1String(java.io.InputStream is)
           
ASN1String(java.lang.String value)
          Create a new ASN1String with the given string value and the ASN1.IA5STRING type.
ASN1String(java.lang.String value, int type)
          Create a new ASN1String with the given string value and the given type.

 

Method Summary
 ASN1Header getHeader()
           
 int getTag()
           
 java.lang.String getValue()
           
 void input(java.io.InputStream is)
          Inputs this object from the specified input stream.
static java.lang.String inputValue(java.io.InputStream is)
           
 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.lang.String value)
           
static void outputValue(java.io.OutputStream os, java.lang.String value, int tag)
           
static void outputValueWithTag(java.io.OutputStream os, java.lang.String value, int tag)
           
 java.lang.String toString()
           

 

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

 

Constructor Detail

ASN1String

public ASN1String(java.lang.String value)
Create a new ASN1String with the given string value and the ASN1.IA5STRING type.

ASN1String

public ASN1String(java.lang.String value,
                  int type)
Create a new ASN1String with the given string value and the given type.

ASN1String

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

Method Detail

getHeader

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

getValue

public java.lang.String getValue()

getTag

public int getTag()

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

inputValue

public static java.lang.String inputValue(java.io.InputStream is)
                                   throws java.io.IOException
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

outputValue

public static void outputValue(java.io.OutputStream os,
                               java.lang.String value)
                        throws java.io.IOException
Throws:
java.io.IOException

outputValue

public static void outputValue(java.io.OutputStream os,
                               java.lang.String value,
                               int tag)
                        throws java.io.IOException
Throws:
java.io.IOException

outputValueWithTag

public static void outputValueWithTag(java.io.OutputStream os,
                                      java.lang.String value,
                                      int tag)
                               throws java.io.IOException
Throws:
java.io.IOException

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

B28171-01


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