demo.asn1
Class PrivateASN1Type

java.lang.Object
  |
  +--iaik.asn1.ASN1Object
        |
        +--demo.asn1.PrivateASN1Type
All Implemented Interfaces:
Cloneable

public class PrivateASN1Type
extends ASN1Object

This class shows an example of how to use private or application tags.

Version:
File Revision 14

Fields inherited from class iaik.asn1.ASN1Object
asnType, constructed, encode_listener, indefinite_length, isStringType, stream_mode
 
Constructor Summary
PrivateASN1Type()
          The default constructor.
PrivateASN1Type(int x, int y)
          Create a new PrivateASN1Type form the coordinates.
PrivateASN1Type(Point point)
          Create a new PrivateASN1Type form a Point.
 
Method Summary
protected  void decode(int length, InputStream is)
          Decodes the next available data from the InputStream.
protected  void encode(OutputStream os)
          DER encodes this BOOLEAN ASN1Object and writes the result to the DerEncodeOutputStream.
 Object getValue()
          Returns the value of this ASN1Object.
static void main(String[] argv)
          Test our new private ASN.1 type.
 void setValue(Object object)
          Sets the value of this ASN1Object.
static void start()
           
 String toString()
          Returns a string that represents the contents of this private ASN.1 object.
 
Methods inherited from class iaik.asn1.ASN1Object
addComponent, addEncodeListener, clone, countComponents, encodeObject, getAsnType, getComponentAt, indefiniteLength, isA, isConstructed, isStringType, setIndefiniteLength
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PrivateASN1Type

public PrivateASN1Type()
The default constructor.

PrivateASN1Type

public PrivateASN1Type(Point point)
Create a new PrivateASN1Type form a Point.
Parameters:
point - a Point

PrivateASN1Type

public PrivateASN1Type(int x,
                       int y)
Create a new PrivateASN1Type form the coordinates.
Parameters:
x - the x coordinate
y - the y coordinate
Method Detail

setValue

public void setValue(Object object)
Sets the value of this ASN1Object. Implements the abstract class.
Overrides:
setValue in class ASN1Object
Parameters:
object - the value object the value of this ASN1Object should be set to

getValue

public Object getValue()
Returns the value of this ASN1Object. Implements the abstract class.
Overrides:
getValue in class ASN1Object
Returns:
the value of this ASN1Object

encode

protected void encode(OutputStream os)
               throws IOException
DER encodes this BOOLEAN ASN1Object and writes the result to the DerEncodeOutputStream.
Overrides:
encode in class ASN1Object
Parameters:
os - the output stream to which to write the data

decode

protected void decode(int length,
                      InputStream is)
               throws IOException,
                      CodingException
Decodes the next available data from the InputStream.
Overrides:
decode in class ASN1Object
Parameters:
length - the length of the ASN1Object which shall be decoded
is - the input stream from which the DER encoded data is read in
Throws:
IOException - if there is a problem with the InputStream
CodingException - if the bytes from is could not be decoded

toString

public String toString()
Returns a string that represents the contents of this private ASN.1 object.
Overrides:
toString in class ASN1Object
Returns:
the string representation
See Also:
ASN1Object.toString()

start

public static void start()

main

public static void main(String[] argv)
                 throws IOException
Test our new private ASN.1 type.

This Javadoc may contain text parts from Internet Standard specifications (RFC 2459, 3280, 3039, 2560, 1521, 821, 822, 2253, 1319, 1321, ,2630, 2631, 2268, 3058, 2984, 2104, 2144, 2040, 2311, 2279, see copyright note) and RSA Data Security Public-Key Cryptography Standards (PKCS#1,3,5,7,8,9,10,12, see copyright note).

IAIK-JCE 3.1 with IAIK-JCE CC Core 3.1, (c) 1997-2004 IAIK