SHOW Signed
 

net.rim.device.api.crypto.asn1
Class ASN1InputStream

java.lang.Object
  |
  +--net.rim.device.api.crypto.asn1.ASN1InputStream

public class ASN1InputStream
extends Object

A parser which parses bytes according to the ASN.1 Distinguished Encoding Rules (DER) and Basic Encoding Rules (BER) format specification.

Note: This is parses data in the same way that ASN1InputByteArray does. The difference is that ASN1InputByteArray class acts on byte arrays, rather than input streams, and is less object intensive. Hence, ASN1InputByteArray should be used instead of ASN1InputStream whenever possible. The only time you would want to use ASN1InputStream over ASN1InputByteArray is when you wish to be looking at multiple positions in the stream at once ( such as if you want to look at two sequences, within the same structure, at the same time.

Example Usage

The following example inputs a Test type sequence of DER-encoded bytes from a file, in the ASN.1 format:

Note that exception caching is omitted for clarity.

 Test   ::=   SEQUENCE {
      myNumber    INTEGER,
      myArray     OCTET_STRING 
 }
 

// Declarations of variables which will hold the values from the Test fields int myNumber; byte[] myArray; // Our input stream is an object which inherits from java.io.InputStream InputStream inputStream = ...; // Create an ASN.1 input stream (which uses DER encoding) ASN1InputStream asn1Input = ASN1InputStream(inputStream); // Read the beginning of an ASN.1 sequence ASN1InputStream testSequence = asn1Input.readSequence(); // Read an integer value from the input stream myNumber = testSequence.readInteger(); // Read the octet string myArray = testSequence.readOctetStringAsByteArray(); // The value of the ASN.1 type "Test" is now stored in myNumber and myArray

Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

Since:
JDE 3.6.0
See Also:
DERTags, ASN1InputByteArray, ASN1OutputStream

Constructor Summary
 Category: Signed ASN1InputStream(byte[] data)
          Creates an ASN1InputStream object based upon the data in the given byte array.
 Category: Signed ASN1InputStream(byte[] data, int offset, int length)
          Creates an ASN1InputStream based upon the data in the given byte array.
 Category: Signed ASN1InputStream(InputStream inputStream)
          Constructs an ASN1InputStream object which reads bytes from inputStream.
 
Method Summary
 Category: Signed  boolean endOfStream()
          Checks if we are at the end of this ASN1 stream, returning true if this is the case.
 Category: Signed  boolean isNextTagApplicationSpecific()
          Returns true if the next tag indicates application-specific.
 Category: Signed  boolean isNextTagContextSpecific()
          Returns true if the next tag indicates context-specific.
 Category: Signed  boolean isNextTagPrivate()
          Returns true if the next tag indicates private-use.
 Category: Signed  boolean isNextTagUniversal()
          Returns true if the next tag indicates Universal.
 Category: Signed  int peekNextTag()
          Returns the next tag value from the stream (without any flags).
 Category: Signed  ASN1BitSet readBitString()
          Reads a bit string in from the ASN1 input stream.
 Category: Signed  ASN1BitSet readBitString(int tagging, int tag)
          Reads a bit string in from the ASN1 input stream with tagging.
 Category: Signed  ASN1BitSet readBitString(int tagging, int tag, byte[] defaultValue)
          Reads a bit string in from the ASN1 input stream with tagging.
 Category: Signed  ASN1BitSet readBitString(int tagging, int tag, int clsFlags)
          Reads a bit string in from the ASN1 input stream with tagging.
 Category: Signed  ASN1BitSet readBitString(int tagging, int tag, int clsFlags, byte[] defaultValue)
          Reads a bit string in from the ASN1 input stream with tagging.
 Category: Signed  String readBMPString()
          Reads a BMP string in from the ASN1 input stream.
 Category: Signed  String readBMPString(int tagging, int tag)
          Reads a BMP string in from the ASN1 input stream with tagging.
 Category: Signed  String readBMPString(int tagging, int tag, int clsFlags)
          Reads a BMP string in from the ASN1 input stream with tagging.
 Category: Signed  String readBMPString(int tagging, int tag, int clsFlags, String defaultValue)
          Reads a BMP string in from the ASN1 input stream with tagging.
 Category: Signed  String readBMPString(int tagging, int tag, String defaultValue)
          Reads a BMP string in from the ASN1 input stream with tagging.
 Category: Signed  boolean readBoolean()
          Reads a boolean in from the ASN1 input stream.
 Category: Signed  boolean readBoolean(int tagging, int tag)
          Reads a boolean in from the ASN1 input stream with tagging.
 Category: Signed  boolean readBoolean(int tagging, int tag, boolean defaultValue)
          Reads a boolean in from the ASN1 input stream with tagging.
 Category: Signed  boolean readBoolean(int tagging, int tag, int clsFlags)
          Reads a boolean in from the ASN1 input stream with tagging.
 Category: Signed  boolean readBoolean(int tagging, int tag, int clsFlags, boolean defaultValue)
          Reads a boolean in from the ASN1 input stream with tagging.
 Category: Signed  int readEnumerated()
          Reads an enumerated value in from the ASN1 input stream.
 Category: Signed  int readEnumerated(int tagging, int tag)
          Reads an enumerated value in from the ASN1 input stream with tagging.
 Category: Signed  int readEnumerated(int tagging, int tag, int defaultValue)
          Reads an enumerated value in from the ASN1 input stream with tagging.
 Category: Signed  int readEnumerated(int tagging, int tag, int clsFlags, int defaultValue)
          Reads an enumerated value in from the ASN1 input stream with tagging.
 Category: Signed  byte[] readFieldAsByteArray()
          Returns the current field as a byte array.
 Category: Signed  long readGeneralizedTime()
          Returns an ASN.1 explicit time object from the input.
 Category: Signed  long readGeneralizedTime(int tagging, int tag)
          Returns an ASN.1 explicit time object from the input.
 Category: Signed  long readGeneralizedTime(int tagging, int tag, int clsFlags)
          Returns an ASN.1 explicit time object from the input.
 Category: Signed  long readGeneralizedTime(int tagging, int tag, int clsFlags, long defaultValue)
          Returns an ASN.1 explicit time object from the input.
 Category: Signed  long readGeneralizedTime(int tagging, int tag, long defaultValue)
          Returns an ASN.1 explicit time object from the input.
 Category: Signed  String readIA5String()
          Reads an IA5 string in from the ASN1 input stream.
 Category: Signed  String readIA5String(int tagging, int tag)
          Reads a IA5 string in from the ASN1 input stream with tagging.
 Category: Signed  String readIA5String(int tagging, int tag, int clsFlags)
          Reads a IA5 string in from the ASN1 input stream with tagging.
 Category: Signed  String readIA5String(int tagging, int tag, int clsFlags, String defaultValue)
          Reads a IA5 string in from the ASN1 input stream with tagging.
 Category: Signed  String readIA5String(int tagging, int tag, String defaultValue)
          Reads a IA5 string in from the ASN1 input stream with tagging.
 Category: Signed  int readInteger()
          Reads an integer in from the ASN1 input stream.
 Category: Signed  int readInteger(int tagging, int tag)
          Reads an integer in from the ASN1 input stream with tagging.
 Category: Signed  int readInteger(int tagging, int tag, int defaultValue)
          Reads an integer in from the ASN1 input stream with tagging.
 Category: Signed  int readInteger(int tagging, int tag, int clsFlags, int defaultValue)
          Reads an integer in from the ASN1 input stream with tagging.
 Category: Signed  byte[] readIntegerAsByteArray()
          Reads an integer (as a byte array) in from the ASN1 input stream.
 Category: Signed  byte[] readIntegerAsByteArray(int tagging, int tag)
          Reads an integer (as a byte array) in from the ASN1 input stream with tagging.
 Category: Signed  byte[] readIntegerAsByteArray(int tagging, int tag, byte[] defaultValue)
          Reads an integer (as a byte array) in from the ASN1 input stream with tagging.
 Category: Signed  byte[] readIntegerAsByteArray(int tagging, int tag, int clsFlags)
          Reads an integer (as a byte array) in from the ASN1 input stream with tagging.
 Category: Signed  byte[] readIntegerAsByteArray(int tagging, int tag, int clsFlags, byte[] defaultValue)
          Reads an integer (as a byte array) in from the ASN1 input stream with tagging.
 Category: Signed  boolean readNull()
          Reads a null in from the ASN1 input stream.
 Category: Signed  boolean readNull(int tagging, int tag)
          Reads a null in from the ASN1 input stream with tagging.
 Category: Signed  boolean readNull(int tagging, int tag, boolean defaultValue)
          Reads a null in from the ASN1 input stream with tagging.
 Category: Signed  boolean readNull(int tagging, int tag, int clsFlags)
          Reads a null in from the ASN1 input stream with tagging.
 Category: Signed  boolean readNull(int tagging, int tag, int clsFlags, boolean defaultValue)
          Reads a null in from the ASN1 input stream with tagging.
 Category: Signed  InputStream readOctetString()
          Reads an octet string in from the ASN1 input stream.
 Category: Signed  InputStream readOctetString(int tagging, int tag)
          Reads an octet string in from the ASN1 input stream with tagging.
 Category: Signed  InputStream readOctetString(int tagging, int tag, byte[] defaultValue)
          Reads an octet string in from the ASN1 input stream with tagging.
 Category: Signed  InputStream readOctetString(int tagging, int tag, int clsFlags)
          Reads an octet string in from the ASN1 input stream with tagging.
 Category: Signed  InputStream readOctetString(int tagging, int tag, int clsFlags, byte[] defaultValue)
          Reads an octet string in from the ASN1 input stream with tagging.
 Category: Signed  byte[] readOctetStringAsByteArray()
          Reads an octet string in from the ASN1 input stream.
 Category: Signed  byte[] readOctetStringAsByteArray(int tagging, int tag)
          Reads an octet string in from the ASN1 input stream with tagging.
 Category: Signed  byte[] readOctetStringAsByteArray(int tagging, int tag, byte[] defaultValue)
          Reads an octet string in from the ASN1 input stream with tagging.
 Category: Signed  byte[] readOctetStringAsByteArray(int tagging, int tag, int clsFlags)
          Reads an octet string in from the ASN1 input stream with tagging.
 Category: Signed  byte[] readOctetStringAsByteArray(int tagging, int tag, int clsFlags, byte[] defaultValue)
          Reads an octet string in from the ASN1 input stream with tagging.
 Category: Signed  OID readOID()
          Returns an ASN.1 Object Identifier (OID) from the input.
 Category: Signed  OID readOID(int tagging, int tag)
          Returns an ASN.1 Object Identifier (OID) from the input with tagging.
 Category: Signed  OID readOID(int tagging, int tag, int clsFlags)
          Returns an ASN.1 Object Identifier (OID) from the input with tagging.
 Category: Signed  OID readOID(int tagging, int tag, int clsFlags, OID defaultValue)
          Returns an ASN.1 Object Identifier (OID) from the input with tagging.
 Category: Signed  OID readOID(int tagging, int tag, OID defaultValue)
          Returns an ASN.1 Object Identifier (OID) from the input with tagging.
 Category: Signed  String readPrintableString()
          Reads a PRINTABLE string in from the ASN1 input stream.
 Category: Signed  String readPrintableString(int tagging, int tag)
          Reads a PRINTABLE string in from the ASN1 input stream with tagging.
 Category: Signed  String readPrintableString(int tagging, int tag, int clsFlags)
          Reads a PRINTABLE string in from the ASN1 input stream with tagging.
 Category: Signed  String readPrintableString(int tagging, int tag, int clsFlags, String defaultValue)
          Reads a PRINTABLE string in from the ASN1 input stream with tagging.
 Category: Signed  String readPrintableString(int tagging, int tag, String defaultValue)
          Reads a PRINTABLE string in from the ASN1 input stream with tagging.
 Category: Signed  ASN1InputStream readSequence()
          Reads a sequence in from the ASN1 input stream.
 Category: Signed  ASN1InputStream readSequence(int tagging, int tag)
          Reads a sequence in from the ASN1 input stream with tagging.
 Category: Signed  ASN1InputStream readSequence(int tagging, int tag, int clsFlags)
          Reads a sequence in from the ASN1 input stream with tagging.
 Category: Signed  ASN1InputStream readSet()
          Reads a set in from the ASN1 input stream.
 Category: Signed  ASN1InputStream readSet(int tagging, int tag)
          Reads a set in from the ASN1 input stream with tagging.
 Category: Signed  ASN1InputStream readSet(int tagging, int tag, int clsFlags)
          Reads a set in from the ASN1 input stream with tagging.
 Category: Signed  InputStream readStreamWithTag(int tag)
          Reads a stream from the ASN1 input stream with tagging.
 Category: Signed  String readT61String()
          Reads a T61 string in from the ASN1 input stream.
 Category: Signed  String readT61String(int tagging, int tag)
          Reads a T61 string in from the ASN1 input stream with tagging.
 Category: Signed  String readT61String(int tagging, int tag, int clsFlags)
          Reads a T61 string in from the ASN1 input stream with tagging.
 Category: Signed  String readT61String(int tagging, int tag, int clsFlags, String defaultValue)
          Reads a T61 string in from the ASN1 input stream with tagging.
 Category: Signed  String readT61String(int tagging, int tag, String defaultValue)
          Reads a T61 string in from the ASN1 input stream with tagging.
 Category: Signed  long readUTCTime()
          Returns an ASN.1 explicit time object from the input.
 Category: Signed  long readUTCTime(int tagging, int tag)
          Returns an ASN.1 explicit time object from the input.
 Category: Signed  long readUTCTime(int tagging, int tag, int clsFlags)
          Returns an ASN.1 explicit time object from the input.
 Category: Signed  long readUTCTime(int tagging, int tag, int clsFlags, long defaultValue)
          Returns an ASN.1 explicit time object from the input.
 Category: Signed  long readUTCTime(int tagging, int tag, long defaultValue)
          Returns an ASN.1 explicit time object from the input.
 Category: Signed  String readUTF8String()
          Reads a UTF8 string in from the ASN1 input stream.
 Category: Signed  String readUTF8String(int tagging, int tag)
          Reads a UTF8 string in from the ASN1 input stream with tagging.
 Category: Signed  String readUTF8String(int tagging, int tag, int clsFlags)
          Reads a UTF8 string in from the ASN1 input stream with tagging.
 Category: Signed  String readUTF8String(int tagging, int tag, int clsFlags, String defaultValue)
          Reads a UTF8 string in from the ASN1 input stream with tagging.
 Category: Signed  String readUTF8String(int tagging, int tag, String defaultValue)
          Reads a UTF8 string in from the ASN1 input stream with tagging.
 Category: Signed  void skipField()
          Skips the current field.
 Category: Signed  void skipField(int tag)
          Skips the current field.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ASN1InputStream

public ASN1InputStream(byte[] data)
Creates an ASN1InputStream object based upon the data in the given byte array.

Parameters:
data - The byte array containing the ASN1 data.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

ASN1InputStream

public ASN1InputStream(byte[] data,
                       int offset,
                       int length)
Creates an ASN1InputStream based upon the data in the given byte array.

Parameters:
data - The byte array containing the ASN1 data.
offset - The starting offset of the ASN1 data within the array.
length - The length of the ASN1 data.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

ASN1InputStream

public ASN1InputStream(InputStream inputStream)
Constructs an ASN1InputStream object which reads bytes from inputStream.

Parameters:
inputStream - The input stream containing the ASN1 data (must not be null).
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Method Detail

endOfStream

public boolean endOfStream()
                    throws IOException,
                           ASN1EncodingException
Checks if we are at the end of this ASN1 stream, returning true if this is the case.

Returns:
A boolean that indicates the end of the stream.
Throws:
IOException - Thrown if an I/O error occurs.
ASN1EncodingException - Thrown if the data encountered is not in the expected format.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

isNextTagApplicationSpecific

public boolean isNextTagApplicationSpecific()
                                     throws EOFException,
                                            IOException
Returns true if the next tag indicates application-specific.

Application-specific means that the assigned tag is specific to the scope of the current application.

Returns:
A boolean that determines if the next tag is application specific.
Throws:
EOFException - Thrown when the end of the stream is reached.
IOException - Thrown in the case of an I/O error.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

isNextTagContextSpecific

public boolean isNextTagContextSpecific()
                                 throws EOFException,
                                        IOException
Returns true if the next tag indicates context-specific.

Context-specific means that the assigned tag is specific to the constructed type you find it in.

Returns:
A boolean that determines if the next tag is context specific.
Throws:
EOFException - Thrown when the end of the stream is reached.
IOException - Thrown in the case of an I/O error.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

isNextTagPrivate

public boolean isNextTagPrivate()
                         throws EOFException,
                                IOException
Returns true if the next tag indicates private-use. Private-use means that the assigned tag is private.

Returns:
A boolean that represents the type of the next tag.
Throws:
EOFException - Thrown when the end of the stream is reached.
IOException - Thrown in the case of an I/O error.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

isNextTagUniversal

public boolean isNextTagUniversal()
                           throws EOFException,
                                  IOException
Returns true if the next tag indicates Universal.

Universal means that the assigned tag is recognized outside the scope of the current construction.

Returns:
A boolean that indicates the type of the next tag.
Throws:
EOFException - Thrown when the end of the stream is reached.
IOException - Thrown in the case of an I/O error.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

peekNextTag

public int peekNextTag()
                throws EOFException,
                       IOException
Returns the next tag value from the stream (without any flags). I.e. If the full byte was 0x82 then peekNextTag() will strip off the 0x80 ( the context specific flag ) and leave the 0x02 behind ( which indicates an integer ).

This call can be used for ASN.1 CHOICE or ANY types.

Returns:
An integer that represents the next tag value or -1 if the end of the stream is reached.
Throws:
EOFException - Thrown when the end of the stream is reached.
IOException - Thrown in the case of an I/O error.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readBitString

public ASN1BitSet readBitString()
                         throws ASN1EncodingException,
                                EOFException,
                                IOException
Reads a bit string in from the ASN1 input stream.

Returns:
An ASN1BitSet.
Throws:
ASN1EncodingException - Thrown if the String was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readBitString

public ASN1BitSet readBitString(int tagging,
                                int tag)
                         throws ASN1EncodingException,
                                EOFException,
                                IOException
Reads a bit string in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
Returns:
An ASN1BitSet.
Throws:
ASN1EncodingException - Thrown if the String was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readBitString

public ASN1BitSet readBitString(int tagging,
                                int tag,
                                byte[] defaultValue)
                         throws ASN1EncodingException,
                                EOFException,
                                IOException
Reads a bit string in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
defaultValue - The value to return if the tag cannot be found.
Returns:
An ASN1BitSet.
Throws:
ASN1EncodingException - Thrown if the String was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readBitString

public ASN1BitSet readBitString(int tagging,
                                int tag,
                                int clsFlags)
                         throws ASN1EncodingException,
                                EOFException,
                                IOException
Reads a bit string in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
clsFlags - The class flag to check for ( either DERTags.UNIVERSAL_CLASS_FLAG, DERTags.APPLICATION_SPECIFIC_CLASS_FLAG, DERTags.CONTEXT_SPECIFIC_CLASS_FLAG or DERTags.PRIVATE_CLASS_FLAG )
Returns:
An ASN1BitSet.
Throws:
ASN1EncodingException - Thrown if the String was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readBitString

public ASN1BitSet readBitString(int tagging,
                                int tag,
                                int clsFlags,
                                byte[] defaultValue)
                         throws ASN1EncodingException,
                                EOFException,
                                IOException
Reads a bit string in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
clsFlags - The class flag to check for ( either DERTags.UNIVERSAL_CLASS_FLAG, DERTags.APPLICATION_SPECIFIC_CLASS_FLAG, DERTags.CONTEXT_SPECIFIC_CLASS_FLAG or DERTags.PRIVATE_CLASS_FLAG )
defaultValue - The value to return if the tag cannot be found.
Returns:
An ASN1BitSet.
Throws:
ASN1EncodingException - Thrown if the String was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readBMPString

public String readBMPString()
                     throws ASN1EncodingException,
                            EOFException,
                            IOException
Reads a BMP string in from the ASN1 input stream.

Returns:
The String.
Throws:
ASN1EncodingException - Thrown if the string could not be found or was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readBMPString

public String readBMPString(int tagging,
                            int tag)
                     throws ASN1EncodingException,
                            EOFException,
                            IOException
Reads a BMP string in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
Returns:
The String value, or default value if the expected tag could not be found.
Throws:
ASN1EncodingException - Thrown if the string was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readBMPString

public String readBMPString(int tagging,
                            int tag,
                            int clsFlags)
                     throws ASN1EncodingException,
                            EOFException,
                            IOException
Reads a BMP string in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
clsFlags - The class flag to check for ( either DERTags.UNIVERSAL_CLASS_FLAG, DERTags.APPLICATION_SPECIFIC_CLASS_FLAG, DERTags.CONTEXT_SPECIFIC_CLASS_FLAG or DERTags.PRIVATE_CLASS_FLAG )
Returns:
The String value, or default value if the expected tag could not be found.
Throws:
ASN1EncodingException - Thrown if the String was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readBMPString

public String readBMPString(int tagging,
                            int tag,
                            int clsFlags,
                            String defaultValue)
                     throws ASN1EncodingException,
                            EOFException,
                            IOException
Reads a BMP string in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
clsFlags - The class flag to check for ( either DERTags.UNIVERSAL_CLASS_FLAG, DERTags.APPLICATION_SPECIFIC_CLASS_FLAG, DERTags.CONTEXT_SPECIFIC_CLASS_FLAG or DERTags.PRIVATE_CLASS_FLAG )
defaultValue - The value to return if the tag cannot be found.
Returns:
The String value, or default value if the expected tag could not be found.
Throws:
ASN1EncodingException - Thrown if the String was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readBMPString

public String readBMPString(int tagging,
                            int tag,
                            String defaultValue)
                     throws ASN1EncodingException,
                            EOFException,
                            IOException
Reads a BMP string in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
defaultValue - The value to return if the tag cannot be found.
Returns:
The String value, or default value if the expected tag could not be found.
Throws:
ASN1EncodingException - Thrown if the String was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readBoolean

public boolean readBoolean()
                    throws ASN1EncodingException,
                           EOFException,
                           IOException
Reads a boolean in from the ASN1 input stream.

Returns:
The boolean value.
Throws:
ASN1EncodingException - Thrown if the boolean could not be found or was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readBoolean

public boolean readBoolean(int tagging,
                           int tag)
                    throws ASN1EncodingException,
                           EOFException,
                           IOException
Reads a boolean in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
Returns:
The boolean value.
Throws:
ASN1EncodingException - Thrown if the boolean was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readBoolean

public boolean readBoolean(int tagging,
                           int tag,
                           boolean defaultValue)
                    throws ASN1EncodingException,
                           EOFException,
                           IOException
Reads a boolean in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
defaultValue - The value to return if the tag cannot be found.
Returns:
The boolean value, or default value if the expected tag could not be found.
Throws:
ASN1EncodingException - Thrown if the boolean was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readBoolean

public boolean readBoolean(int tagging,
                           int tag,
                           int clsFlags)
                    throws ASN1EncodingException,
                           EOFException,
                           IOException
Reads a boolean in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
clsFlags - The class flag to check for ( either DERTags.UNIVERSAL_CLASS_FLAG, DERTags.APPLICATION_SPECIFIC_CLASS_FLAG, DERTags.CONTEXT_SPECIFIC_CLASS_FLAG or DERTags.PRIVATE_CLASS_FLAG )
Returns:
The boolean value.
Throws:
ASN1EncodingException - Thrown if the boolean was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readBoolean

public boolean readBoolean(int tagging,
                           int tag,
                           int clsFlags,
                           boolean defaultValue)
                    throws ASN1EncodingException,
                           EOFException,
                           IOException
Reads a boolean in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
clsFlags - The class flag to check for ( either DERTags.UNIVERSAL_CLASS_FLAG, DERTags.APPLICATION_SPECIFIC_CLASS_FLAG, DERTags.CONTEXT_SPECIFIC_CLASS_FLAG or DERTags.PRIVATE_CLASS_FLAG )
defaultValue - The value to return if the tag cannot be found.
Returns:
The boolean value, or default value if the expected tag could not be found.
Throws:
ASN1EncodingException - Thrown if the boolean was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readEnumerated

public int readEnumerated()
                   throws ASN1EncodingException,
                          EOFException,
                          IOException
Reads an enumerated value in from the ASN1 input stream.

Returns:
The enumerated integer value
Throws:
ASN1EncodingException - Thrown if the value was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readEnumerated

public int readEnumerated(int tagging,
                          int tag)
                   throws ASN1EncodingException,
                          EOFException,
                          IOException
Reads an enumerated value in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
Returns:
The enumerated integer value
Throws:
ASN1EncodingException - Thrown if the value was incorrectly formatted.
EOFException - Thrown f the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readEnumerated

public int readEnumerated(int tagging,
                          int tag,
                          int defaultValue)
                   throws ASN1EncodingException,
                          EOFException,
                          IOException
Reads an enumerated value in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
defaultValue - The value to return if the tag cannot be found.
Returns:
The enumerated integer value, or default value if the expected tag could not be found.
Throws:
ASN1EncodingException - Thrown if the value was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readEnumerated

public int readEnumerated(int tagging,
                          int tag,
                          int clsFlags,
                          int defaultValue)
                   throws ASN1EncodingException,
                          EOFException,
                          IOException
Reads an enumerated value in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
clsFlags - The class flag to check for ( either DERTags.UNIVERSAL_CLASS_FLAG, DERTags.APPLICATION_SPECIFIC_CLASS_FLAG, DERTags.CONTEXT_SPECIFIC_CLASS_FLAG or DERTags.PRIVATE_CLASS_FLAG )
defaultValue - The value to return if the tag cannot be found.
Returns:
The enumerated integer value, or default value if the expected tag could not be found.
Throws:
ASN1EncodingException - Thrown if the value was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readFieldAsByteArray

public byte[] readFieldAsByteArray()
                            throws IOException,
                                   ASN1EncodingException
Returns the current field as a byte array.

A field consists of a tag, length and data value. So calling this function on an octet string would return a byte array containing the tag of the octet string ( 0x04 ), the length of the octet string, and the contents of the octet string.

Returns:
A byte array containing the field.
Throws:
IOException - Thrown if an I/O error occurs.
ASN1EncodingException - Thrown if the data encountered is not in the expected format.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readGeneralizedTime

public long readGeneralizedTime()
                         throws ASN1EncodingException,
                                EOFException,
                                IOException
Returns an ASN.1 explicit time object from the input. Currently this only supports the YYMMDDhhmmZ Generalized time format.

This handles GENERALIZED time.

Returns:
The time as a long
Throws:
ASN1EncodingException - Thrown if the data encountered is not in the expected format.
EOFException - Thrown when the end of the stream is reached.
IOException - Thrown in the case of an I/O error.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readGeneralizedTime

public long readGeneralizedTime(int tagging,
                                int tag)
                         throws ASN1EncodingException,
                                EOFException,
                                IOException
Returns an ASN.1 explicit time object from the input. Currently this only supports the YYMMDDhhmmZ Generalized time format.

This handles GENERALIZED time.

Parameters:
tagging - Whether this is DERTags.TAG_IMPLICIT, DERTags.TAG_EXPLICIT or DERTags.TAG_NONE.
tag - The tag to look for
Returns:
The time as a long
Throws:
ASN1EncodingException - Thrown if the data encountered is not in the expected format.
EOFException - Thrown when the end of the stream is reached.
IOException - Thrown in the case of an I/O error.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readGeneralizedTime

public long readGeneralizedTime(int tagging,
                                int tag,
                                int clsFlags)
                         throws ASN1EncodingException,
                                EOFException,
                                IOException
Returns an ASN.1 explicit time object from the input. Currently this only supports the YYMMDDhhmmZ Generalized time format.

This handles GENERALIZED time.

Parameters:
tagging - Whether this is DERTags.TAG_IMPLICIT, DERTags.TAG_EXPLICIT or DERTags.TAG_NONE.
tag - The tag to look for.
clsFlags - The class flag to check for ( either DERTags.UNIVERSAL_CLASS_FLAG, DERTags.APPLICATION_SPECIFIC_CLASS_FLAG, DERTags.CONTEXT_SPECIFIC_CLASS_FLAG or DERTags.PRIVATE_CLASS_FLAG )
Returns:
The time as a long.
Throws:
ASN1EncodingException - Thrown if the data encountered is not in the expected format.
EOFException - Thrown when the end of the stream is reached.
IOException - Thrown in the case of an I/O error.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readGeneralizedTime

public long readGeneralizedTime(int tagging,
                                int tag,
                                int clsFlags,
                                long defaultValue)
                         throws ASN1EncodingException,
                                EOFException,
                                IOException
Returns an ASN.1 explicit time object from the input. This handles GENERALIZED time. Currently this only supports the YYMMDDhhmmZ Generalized time format.

Parameters:
tagging - Whether this is DERTags.TAG_IMPLICIT, DERTags.TAG_EXPLICIT or DERTags.TAG_NONE.
tag - The tag to look for.
clsFlags - The class flag to check for ( either DERTags.UNIVERSAL_CLASS_FLAG, DERTags.APPLICATION_SPECIFIC_CLASS_FLAG, DERTags.CONTEXT_SPECIFIC_CLASS_FLAG or DERTags.PRIVATE_CLASS_FLAG )
defaultValue - A default Value to return if not a date.
Returns:
The time as a long
Throws:
ASN1EncodingException - Thrown if the data encountered is not in the expected format.
EOFException - Thrown when the end of the stream is reached.
IOException - Thrown in the case of an I/O error.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readGeneralizedTime

public long readGeneralizedTime(int tagging,
                                int tag,
                                long defaultValue)
                         throws ASN1EncodingException,
                                EOFException,
                                IOException
Returns an ASN.1 explicit time object from the input. Currently this only supports the YYMMDDhhmmZ Generalized time format.

This handles GENERALIZED time.

Parameters:
tagging - Whether this is DERTags.TAG_IMPLICIT, DERTags.TAG_EXPLICIT or DERTags.TAG_NONE.
tag - The tag to look for.
defaultValue - A default Value to return if not a date.
Returns:
The time as a long.
Throws:
ASN1EncodingException - Thrown if the data encountered is not in the expected format.
EOFException - Thrown when the end of the stream is reached.
IOException - Thrown in the case of an I/O error.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readIA5String

public String readIA5String()
                     throws ASN1EncodingException,
                            EOFException,
                            IOException
Reads an IA5 string in from the ASN1 input stream.

Returns:
The String.
Throws:
ASN1EncodingException - Thrown if the string could not be found or was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readIA5String

public String readIA5String(int tagging,
                            int tag)
                     throws ASN1EncodingException,
                            EOFException,
                            IOException
Reads a IA5 string in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
Returns:
The String value, or default value if the expected tag could not be found.
Throws:
ASN1EncodingException - Thrown if the string was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readIA5String

public String readIA5String(int tagging,
                            int tag,
                            int clsFlags)
                     throws ASN1EncodingException,
                            EOFException,
                            IOException
Reads a IA5 string in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
clsFlags - The class flag to check for ( either DERTags.UNIVERSAL_CLASS_FLAG, DERTags.APPLICATION_SPECIFIC_CLASS_FLAG, DERTags.CONTEXT_SPECIFIC_CLASS_FLAG or DERTags.PRIVATE_CLASS_FLAG )
Returns:
The String value, or default value if the expected tag could not be found.
Throws:
ASN1EncodingException - Thrown if the String was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readIA5String

public String readIA5String(int tagging,
                            int tag,
                            int clsFlags,
                            String defaultValue)
                     throws ASN1EncodingException,
                            EOFException,
                            IOException
Reads a IA5 string in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
clsFlags - The class flag to check for ( either DERTags.UNIVERSAL_CLASS_FLAG, DERTags.APPLICATION_SPECIFIC_CLASS_FLAG, DERTags.CONTEXT_SPECIFIC_CLASS_FLAG or DERTags.PRIVATE_CLASS_FLAG )
defaultValue - The value to return if the tag cannot be found.
Returns:
The String value, or default value if the expected tag could not be found.
Throws:
ASN1EncodingException - Thrown if the String was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readIA5String

public String readIA5String(int tagging,
                            int tag,
                            String defaultValue)
                     throws ASN1EncodingException,
                            EOFException,
                            IOException
Reads a IA5 string in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
defaultValue - The value to return if the tag cannot be found.
Returns:
The String value, or default value if the expected tag could not be found.
Throws:
ASN1EncodingException - Thrown if the String was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readInteger

public int readInteger()
                throws ASN1EncodingException,
                       EOFException,
                       IOException
Reads an integer in from the ASN1 input stream.

Returns:
The integer value.
Throws:
ASN1EncodingException - Thrown if the boolean was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readInteger

public int readInteger(int tagging,
                       int tag)
                throws ASN1EncodingException,
                       EOFException,
                       IOException
Reads an integer in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
Returns:
The integer value
Throws:
ASN1EncodingException - Thrown if the boolean was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readInteger

public int readInteger(int tagging,
                       int tag,
                       int defaultValue)
                throws ASN1EncodingException,
                       EOFException,
                       IOException
Reads an integer in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
defaultValue - The value to return if the tag cannot be found.
Returns:
The integer value, or default value if the expected tag could not be found.
Throws:
ASN1EncodingException - Thrown if the boolean was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readInteger

public int readInteger(int tagging,
                       int tag,
                       int clsFlags,
                       int defaultValue)
                throws ASN1EncodingException,
                       EOFException,
                       IOException
Reads an integer in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
clsFlags - The class flag to check for ( either DERTags.UNIVERSAL_CLASS_FLAG, DERTags.APPLICATION_SPECIFIC_CLASS_FLAG, DERTags.CONTEXT_SPECIFIC_CLASS_FLAG or DERTags.PRIVATE_CLASS_FLAG )
defaultValue - The value to return if the tag cannot be found.
Returns:
The integer value, or default value if the expected tag could not be found.
Throws:
ASN1EncodingException - Thrown if the boolean was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readIntegerAsByteArray

public byte[] readIntegerAsByteArray()
                              throws ASN1EncodingException,
                                     EOFException,
                                     IOException
Reads an integer (as a byte array) in from the ASN1 input stream.

Note that if the integer read was negative, it is up to the caller to interpret it as such. We cannot do that interpretation for the user since we are just returning a byte array which has no sign associated with it.

Returns:
A byte array containing the integer value.
Throws:
ASN1EncodingException - Thrown if the boolean could not be found or was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readIntegerAsByteArray

public byte[] readIntegerAsByteArray(int tagging,
                                     int tag)
                              throws ASN1EncodingException,
                                     EOFException,
                                     IOException
Reads an integer (as a byte array) in from the ASN1 input stream with tagging.

Note that if the integer read was negative, it is up to the caller to interpret it as such. We cannot do that interpretation for the user since we are just returning a byte array which has no sign associated with it.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
Returns:
A byte array containing the integer value.
Throws:
ASN1EncodingException - Thrown if the boolean was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readIntegerAsByteArray

public byte[] readIntegerAsByteArray(int tagging,
                                     int tag,
                                     byte[] defaultValue)
                              throws ASN1EncodingException,
                                     EOFException,
                                     IOException
Reads an integer (as a byte array) in from the ASN1 input stream with tagging.

Note that if the integer read was negative, it is up to the caller to interpret it as such. We cannot do that interpretation for the user since we are just returning a byte array which has no sign associated with it.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
defaultValue - The value to return if the tag cannot be found.
Returns:
A byte array containing the integer value, or default value if the expected tag could not be found.
Throws:
ASN1EncodingException - Thrown if the boolean was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readIntegerAsByteArray

public byte[] readIntegerAsByteArray(int tagging,
                                     int tag,
                                     int clsFlags)
                              throws ASN1EncodingException,
                                     EOFException,
                                     IOException
Reads an integer (as a byte array) in from the ASN1 input stream with tagging.

Note that if the integer read was negative, it is up to the caller to interpret it as such. We cannot do that interpretation for the user since we are just returning a byte array which has no sign associated with it.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
clsFlags - The class flag to check for ( either DERTags.UNIVERSAL_CLASS_FLAG, DERTags.APPLICATION_SPECIFIC_CLASS_FLAG, DERTags.CONTEXT_SPECIFIC_CLASS_FLAG or DERTags.PRIVATE_CLASS_FLAG )
Returns:
A byte array containing he integer value, or default value if the expected tag could not be found.
Throws:
ASN1EncodingException - Thrown if the boolean was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readIntegerAsByteArray

public byte[] readIntegerAsByteArray(int tagging,
                                     int tag,
                                     int clsFlags,
                                     byte[] defaultValue)
                              throws ASN1EncodingException,
                                     EOFException,
                                     IOException
Reads an integer (as a byte array) in from the ASN1 input stream with tagging.

Note that if the integer read was negative, it is up to the caller to interpret it as such. We cannot do that interpretation for the user since we are just returning a byte array which has no sign associated with it.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
clsFlags - The class flag to check for ( either DERTags.UNIVERSAL_CLASS_FLAG, DERTags.APPLICATION_SPECIFIC_CLASS_FLAG, DERTags.CONTEXT_SPECIFIC_CLASS_FLAG or DERTags.PRIVATE_CLASS_FLAG )
defaultValue - The value to return if the tag cannot be found.
Returns:
the integer value, or default value if the expected tag could not be found.
Throws:
ASN1EncodingException - Thrown if the boolean was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readNull

public boolean readNull()
                 throws ASN1EncodingException,
                        EOFException,
                        IOException
Reads a null in from the ASN1 input stream.

Returns:
true if the null was found, false otherwise.

Throws:
ASN1EncodingException - Thrown if the null could not be found or was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readNull

public boolean readNull(int tagging,
                        int tag)
                 throws ASN1EncodingException,
                        EOFException,
                        IOException
Reads a null in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
Returns:
Returns true if the null was found, false otherwise.
Throws:
ASN1EncodingException - Thrown if the null was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readNull

public boolean readNull(int tagging,
                        int tag,
                        boolean defaultValue)
                 throws ASN1EncodingException,
                        EOFException,
                        IOException
Reads a null in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
defaultValue - The value to return if the tag cannot be found.
Returns:
Returns true if the null was found, false otherwise.
Throws:
ASN1EncodingException - Thrown if the null was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readNull

public boolean readNull(int tagging,
                        int tag,
                        int clsFlags)
                 throws ASN1EncodingException,
                        EOFException,
                        IOException
Reads a null in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
clsFlags - The class flag to check for ( either DERTags.UNIVERSAL_CLASS_FLAG, DERTags.APPLICATION_SPECIFIC_CLASS_FLAG, DERTags.CONTEXT_SPECIFIC_CLASS_FLAG or DERTags.PRIVATE_CLASS_FLAG )
Returns:
True if the null was found, false otherwise.
Throws:
ASN1EncodingException - Thrown if the null was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readNull

public boolean readNull(int tagging,
                        int tag,
                        int clsFlags,
                        boolean defaultValue)
                 throws ASN1EncodingException,
                        EOFException,
                        IOException
Reads a null in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
clsFlags - The class flag to check for ( either DERTags.UNIVERSAL_CLASS_FLAG, DERTags.APPLICATION_SPECIFIC_CLASS_FLAG, DERTags.CONTEXT_SPECIFIC_CLASS_FLAG or DERTags.PRIVATE_CLASS_FLAG )
defaultValue - The value to return if the tag cannot be found.
Returns:
True if the null was found, false otherwise.
Throws:
ASN1EncodingException - Thrown if the null was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readOctetString

public InputStream readOctetString()
                            throws ASN1EncodingException,
                                   EOFException,
                                   IOException
Reads an octet string in from the ASN1 input stream.

Returns:
An input stream. Successive read calls to it will extract the value of the octet string
Throws:
ASN1EncodingException - Thrown if the String was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readOctetString

public InputStream readOctetString(int tagging,
                                   int tag)
                            throws ASN1EncodingException,
                                   EOFException,
                                   IOException
Reads an octet string in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
Returns:
An input stream. Successive read calls to it will extract the value of the octet string
Throws:
ASN1EncodingException - Thrown if the String was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readOctetString

public InputStream readOctetString(int tagging,
                                   int tag,
                                   byte[] defaultValue)
                            throws ASN1EncodingException,
                                   EOFException,
                                   IOException
Reads an octet string in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
defaultValue - The value to return if the tag cannot be found.
Returns:
An input stream. Successive read calls to it will extract the value of the octet string
Throws:
ASN1EncodingException - Thrown if the String was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readOctetString

public InputStream readOctetString(int tagging,
                                   int tag,
                                   int clsFlags)
                            throws ASN1EncodingException,
                                   EOFException,
                                   IOException
Reads an octet string in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
clsFlags - The class flag to check for ( either DERTags.UNIVERSAL_CLASS_FLAG, DERTags.APPLICATION_SPECIFIC_CLASS_FLAG, DERTags.CONTEXT_SPECIFIC_CLASS_FLAG or DERTags.PRIVATE_CLASS_FLAG )
Returns:
An input stream. Successive read calls to it will extract the value of the octet string
Throws:
ASN1EncodingException - Thrown if the String was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readOctetString

public InputStream readOctetString(int tagging,
                                   int tag,
                                   int clsFlags,
                                   byte[] defaultValue)
                            throws ASN1EncodingException,
                                   EOFException,
                                   IOException
Reads an octet string in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
clsFlags - The class flag to check for ( either DERTags.UNIVERSAL_CLASS_FLAG, DERTags.APPLICATION_SPECIFIC_CLASS_FLAG, DERTags.CONTEXT_SPECIFIC_CLASS_FLAG or DERTags.PRIVATE_CLASS_FLAG )
defaultValue - The value to return if the tag cannot be found.
Returns:
An input stream. Successive read calls to it will extract the value of the octet string
Throws:
ASN1EncodingException - Thrown if the String was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readOctetStringAsByteArray

public byte[] readOctetStringAsByteArray()
                                  throws ASN1EncodingException,
                                         EOFException,
                                         IOException
Reads an octet string in from the ASN1 input stream.

Returns:
The contents of the octet string in a byte array.
Throws:
ASN1EncodingException - Thrown if the String was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readOctetStringAsByteArray

public byte[] readOctetStringAsByteArray(int tagging,
                                         int tag)
                                  throws ASN1EncodingException,
                                         EOFException,
                                         IOException
Reads an octet string in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
Returns:
The contents of the octet string in a byte array.
Throws:
ASN1EncodingException - Thrown if the String was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readOctetStringAsByteArray

public byte[] readOctetStringAsByteArray(int tagging,
                                         int tag,
                                         byte[] defaultValue)
                                  throws ASN1EncodingException,
                                         EOFException,
                                         IOException
Reads an octet string in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
defaultValue - The value to return if the tag cannot be found.
Returns:
The contents of the octet string in a byte array.
Throws:
ASN1EncodingException - Thrown if the String was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readOctetStringAsByteArray

public byte[] readOctetStringAsByteArray(int tagging,
                                         int tag,
                                         int clsFlags)
                                  throws ASN1EncodingException,
                                         EOFException,
                                         IOException
Reads an octet string in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
clsFlags - The class flag to check for ( either DERTags.UNIVERSAL_CLASS_FLAG, DERTags.APPLICATION_SPECIFIC_CLASS_FLAG, DERTags.CONTEXT_SPECIFIC_CLASS_FLAG or DERTags.PRIVATE_CLASS_FLAG )
Returns:
The contents of the octet string in a byte array.
Throws:
ASN1EncodingException - Thrown if the String was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readOctetStringAsByteArray

public byte[] readOctetStringAsByteArray(int tagging,
                                         int tag,
                                         int clsFlags,
                                         byte[] defaultValue)
                                  throws ASN1EncodingException,
                                         EOFException,
                                         IOException
Reads an octet string in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
clsFlags - The class flag to check for ( either DERTags.UNIVERSAL_CLASS_FLAG, DERTags.APPLICATION_SPECIFIC_CLASS_FLAG, DERTags.CONTEXT_SPECIFIC_CLASS_FLAG or DERTags.PRIVATE_CLASS_FLAG )
defaultValue - The value to return if the tag cannot be found.
Returns:
The contents of the octet string in a byte array.
Throws:
ASN1EncodingException - Thrown if the String was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readOID

public OID readOID()
            throws ASN1EncodingException,
                   EOFException,
                   IOException
Returns an ASN.1 Object Identifier (OID) from the input.

Returns:
The OID from the input stream.
Throws:
ASN1EncodingException - Thrown if the data encountered is not in the expected format.
EOFException - Thrown when the end of the stream is reached.
IOException - Thrown in the case of an I/O error.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readOID

public OID readOID(int tagging,
                   int tag)
            throws ASN1EncodingException,
                   EOFException,
                   IOException
Returns an ASN.1 Object Identifier (OID) from the input with tagging.

Parameters:
tagging - Whether this is DERTags.TAG_IMPLICIT, DERTags.TAG_EXPLICIT or DERTags.TAG_NONE.
tag - The tag to look for.
Returns:
The OID from the input stream.
Throws:
ASN1EncodingException - Thrown if the data encountered is not in the expected format.
EOFException - Thrown when the end of the stream is reached.
IOException - Thrown in the case of an I/O error.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readOID

public OID readOID(int tagging,
                   int tag,
                   int clsFlags)
            throws ASN1EncodingException,
                   EOFException,
                   IOException
Returns an ASN.1 Object Identifier (OID) from the input with tagging.

Parameters:
tagging - Whether this is DERTags.TAG_IMPLICIT, DERTags.TAG_EXPLICIT or DERTags.TAG_NONE.
tag - The tag to look for.
clsFlags - The class flag to check for ( either DERTags.UNIVERSAL_CLASS_FLAG, DERTags.APPLICATION_SPECIFIC_CLASS_FLAG, DERTags.CONTEXT_SPECIFIC_CLASS_FLAG or DERTags.PRIVATE_CLASS_FLAG )
Returns:
The OID from the input stream.
Throws:
ASN1EncodingException - Thrown if the data encountered is not in the expected format.
EOFException - Thrown when the end of the stream is reached.
IOException - Thrown in the case of an I/O error.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readOID

public OID readOID(int tagging,
                   int tag,
                   int clsFlags,
                   OID defaultValue)
            throws ASN1EncodingException,
                   EOFException,
                   IOException
Returns an ASN.1 Object Identifier (OID) from the input with tagging.

Parameters:
tagging - Whether this is DERTags.TAG_IMPLICIT, DERTags.TAG_EXPLICIT or DERTags.TAG_NONE.
tag - The tag to look for.
clsFlags - The class flag to check for ( either DERTags.UNIVERSAL_CLASS_FLAG, DERTags.APPLICATION_SPECIFIC_CLASS_FLAG, DERTags.CONTEXT_SPECIFIC_CLASS_FLAG or DERTags.PRIVATE_CLASS_FLAG )
defaultValue - A default Value to return if not an oid.
Returns:
The OID from the input stream.
Throws:
ASN1EncodingException - Thrown if the data encountered is not in the expected format.
EOFException - Thrown when the end of the stream is reached.
IOException - Thrown in the case of an I/O error.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readOID

public OID readOID(int tagging,
                   int tag,
                   OID defaultValue)
            throws ASN1EncodingException,
                   EOFException,
                   IOException
Returns an ASN.1 Object Identifier (OID) from the input with tagging.

Parameters:
tagging - Whether this is DERTags.TAG_IMPLICIT, DERTags.TAG_EXPLICIT or DERTags.TAG_NONE
tag - The tag to look for.
defaultValue - A default Value to return if not an oid.
Returns:
The OID from the input stream.
Throws:
ASN1EncodingException - Thrown if the data encountered is not in the expected format.
EOFException - Thrown when the end of the stream is reached.
IOException - Thrown in the case of an I/O error.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readPrintableString

public String readPrintableString()
                           throws ASN1EncodingException,
                                  EOFException,
                                  IOException
Reads a PRINTABLE string in from the ASN1 input stream.

Returns:
The string.
Throws:
ASN1EncodingException - Thrown if the string could not be found or was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readPrintableString

public String readPrintableString(int tagging,
                                  int tag)
                           throws ASN1EncodingException,
                                  EOFException,
                                  IOException
Reads a PRINTABLE string in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
Returns:
The String value, or default value if the expected tag could not be found.
Throws:
ASN1EncodingException - Thrown if the string was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readPrintableString

public String readPrintableString(int tagging,
                                  int tag,
                                  int clsFlags)
                           throws ASN1EncodingException,
                                  EOFException,
                                  IOException
Reads a PRINTABLE string in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
clsFlags - The class flag to check for ( either DERTags.UNIVERSAL_CLASS_FLAG, DERTags.APPLICATION_SPECIFIC_CLASS_FLAG, DERTags.CONTEXT_SPECIFIC_CLASS_FLAG or DERTags.PRIVATE_CLASS_FLAG )
Returns:
The String value, or default value if the expected tag could not be found.
Throws:
ASN1EncodingException - Thrown if the String was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readPrintableString

public String readPrintableString(int tagging,
                                  int tag,
                                  int clsFlags,
                                  String defaultValue)
                           throws ASN1EncodingException,
                                  EOFException,
                                  IOException
Reads a PRINTABLE string in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
clsFlags - The class flag to check for ( either DERTags.UNIVERSAL_CLASS_FLAG, DERTags.APPLICATION_SPECIFIC_CLASS_FLAG, DERTags.CONTEXT_SPECIFIC_CLASS_FLAG or DERTags.PRIVATE_CLASS_FLAG )
defaultValue - The value to return if the tag cannot be found.
Returns:
The String value, or default value if the expected tag could not be found.
Throws:
ASN1EncodingException - Thrown if the String was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readPrintableString

public String readPrintableString(int tagging,
                                  int tag,
                                  String defaultValue)
                           throws ASN1EncodingException,
                                  EOFException,
                                  IOException
Reads a PRINTABLE string in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
defaultValue - The value to return if the tag cannot be found.
Returns:
The String value, or default value if the expected tag could not be found.
Throws:
ASN1EncodingException - Thrown if the String was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readSequence

public ASN1InputStream readSequence()
                             throws ASN1EncodingException,
                                    EOFException,
                                    IOException
Reads a sequence in from the ASN1 input stream.

Returns:
An ASN1InputStream that contains the sequence contents.
Throws:
ASN1EncodingException - Thrown if the sequence could not be found or was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readSequence

public ASN1InputStream readSequence(int tagging,
                                    int tag)
                             throws ASN1EncodingException,
                                    EOFException,
                                    IOException
Reads a sequence in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
Returns:
An ASN1InputStream that contains the sequence contents
Throws:
ASN1EncodingException - Thrown if the sequence was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readSequence

public ASN1InputStream readSequence(int tagging,
                                    int tag,
                                    int clsFlags)
                             throws ASN1EncodingException,
                                    EOFException,
                                    IOException
Reads a sequence in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
clsFlags - The class flag to check for ( either DERTags.UNIVERSAL_CLASS_FLAG, DERTags.APPLICATION_SPECIFIC_CLASS_FLAG, DERTags.CONTEXT_SPECIFIC_CLASS_FLAG or DERTags.PRIVATE_CLASS_FLAG )
Returns:
An ASN1InputStream that contains the sequence contents.
Throws:
ASN1EncodingException - Thrown if the sequence was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readSet

public ASN1InputStream readSet()
                        throws ASN1EncodingException,
                               EOFException,
                               IOException
Reads a set in from the ASN1 input stream.

Returns:
An ASN1InputStream that contains the set contents.
Throws:
ASN1EncodingException - Thrown if the set could not be found or was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readSet

public ASN1InputStream readSet(int tagging,
                               int tag)
                        throws ASN1EncodingException,
                               EOFException,
                               IOException
Reads a set in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
Returns:
An ASN1InputStream that contains the set contents.
Throws:
ASN1EncodingException - Thrown if the set was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readSet

public ASN1InputStream readSet(int tagging,
                               int tag,
                               int clsFlags)
                        throws ASN1EncodingException,
                               EOFException,
                               IOException
Reads a set in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
clsFlags - The class flag to check for ( either DERTags.UNIVERSAL_CLASS_FLAG, DERTags.APPLICATION_SPECIFIC_CLASS_FLAG, DERTags.CONTEXT_SPECIFIC_CLASS_FLAG or DERTags.PRIVATE_CLASS_FLAG )
Returns:
An ASN1InputStream that contains the set contents.
Throws:
ASN1EncodingException - Thrown if the set was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readStreamWithTag

public InputStream readStreamWithTag(int tag)
                              throws ASN1EncodingException,
                                     EOFException,
                                     IOException
Reads a stream from the ASN1 input stream with tagging.

Use this in situations where implicit and explicit tags are imbedded inside of each other.

Parameters:
tag - The tag value to look for.
Returns:
An InputStream that contains the contents.
Throws:
ASN1EncodingException - Thrown if the sequence was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readT61String

public String readT61String()
                     throws ASN1EncodingException,
                            EOFException,
                            IOException
Reads a T61 string in from the ASN1 input stream.

Returns:
The String.
Throws:
ASN1EncodingException - Thrown if the string could not be found or was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readT61String

public String readT61String(int tagging,
                            int tag)
                     throws ASN1EncodingException,
                            EOFException,
                            IOException
Reads a T61 string in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
Returns:
The String value, or default value if the expected tag could not be found.
Throws:
ASN1EncodingException - Thrown if the string was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readT61String

public String readT61String(int tagging,
                            int tag,
                            int clsFlags)
                     throws ASN1EncodingException,
                            EOFException,
                            IOException
Reads a T61 string in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
clsFlags - The class flag to check for ( either DERTags.UNIVERSAL_CLASS_FLAG, DERTags.APPLICATION_SPECIFIC_CLASS_FLAG, DERTags.CONTEXT_SPECIFIC_CLASS_FLAG or DERTags.PRIVATE_CLASS_FLAG )
Returns:
The String value, or default value if the expected tag could not be found.
Throws:
ASN1EncodingException - Thrown if the String was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readT61String

public String readT61String(int tagging,
                            int tag,
                            int clsFlags,
                            String defaultValue)
                     throws ASN1EncodingException,
                            EOFException,
                            IOException
Reads a T61 string in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
clsFlags - The class flag to check for ( either DERTags.UNIVERSAL_CLASS_FLAG, DERTags.APPLICATION_SPECIFIC_CLASS_FLAG, DERTags.CONTEXT_SPECIFIC_CLASS_FLAG or DERTags.PRIVATE_CLASS_FLAG )
defaultValue - The value to return if the tag cannot be found.
Returns:
The String value, or default value if the expected tag could not be found.
Throws:
ASN1EncodingException - Thrown if the String was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readT61String

public String readT61String(int tagging,
                            int tag,
                            String defaultValue)
                     throws ASN1EncodingException,
                            EOFException,
                            IOException
Reads a T61 string in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
defaultValue - The value to return if the tag cannot be found.
Returns:
The String value, or default value if the expected tag could not be found.
Throws:
ASN1EncodingException - Thrown if the String was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readUTCTime

public long readUTCTime()
                 throws ASN1EncodingException,
                        EOFException,
                        IOException
Returns an ASN.1 explicit time object from the input. Currently this only supports the YYMMDDhhmmZ UTC time format.

This handles UTC time.

Returns:
The time as a long
Throws:
ASN1EncodingException - Thrown if the data encountered is not in the expected format.
EOFException - Thrown when the end of the stream is reached.
IOException - Thrown in the case of an I/O error.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readUTCTime

public long readUTCTime(int tagging,
                        int tag)
                 throws ASN1EncodingException,
                        EOFException,
                        IOException
Returns an ASN.1 explicit time object from the input. Currently this only supports the YYMMDDhhmmZ UTC time format.

This handles UTC time.

Parameters:
tagging - Whether this is DERTags.TAG_IMPLICIT, DERTags.TAG_EXPLICIT or DERTags.TAG_NONE.
tag - The tag to look for.
Returns:
The time as a long.
Throws:
ASN1EncodingException - Thrown if the data encountered is not in the expected format.
EOFException - Thrown when the end of the stream is reached.
IOException - Thrown in the case of an I/O error.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readUTCTime

public long readUTCTime(int tagging,
                        int tag,
                        int clsFlags)
                 throws ASN1EncodingException,
                        EOFException,
                        IOException
Returns an ASN.1 explicit time object from the input. Currently this only supports the YYMMDDhhmmZ UTC time format.

This handles UTC time.

Parameters:
tagging - Whether this is DERTags.TAG_IMPLICIT, DERTags.TAG_EXPLICIT or DERTags.TAG_NONE.
tag - The tag to look for.
clsFlags - The class flag to check for ( either DERTags.UNIVERSAL_CLASS_FLAG, DERTags.APPLICATION_SPECIFIC_CLASS_FLAG, DERTags.CONTEXT_SPECIFIC_CLASS_FLAG or DERTags.PRIVATE_CLASS_FLAG )
Returns:
The time as a long.
Throws:
ASN1EncodingException - Thrown if the data encountered is not in the expected format.
EOFException - Thrown when the end of the stream is reached.
IOException - Thrown in the case of an I/O error.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readUTCTime

public long readUTCTime(int tagging,
                        int tag,
                        int clsFlags,
                        long defaultValue)
                 throws ASN1EncodingException,
                        EOFException,
                        IOException
Returns an ASN.1 explicit time object from the input. Currently this only supports the YYMMDDhhmmZ UTC time format.

This handles UTC time format.

Parameters:
tagging - Whether this is DERTags.TAG_IMPLICIT, DERTags.TAG_EXPLICIT or DERTags.TAG_NONE.
tag - The tag to look for.
clsFlags - The class flag to check for ( either DERTags.UNIVERSAL_CLASS_FLAG, DERTags.APPLICATION_SPECIFIC_CLASS_FLAG, DERTags.CONTEXT_SPECIFIC_CLASS_FLAG or DERTags.PRIVATE_CLASS_FLAG )
defaultValue - A default Value to return if not a date.
Returns:
The time as a long.
Throws:
ASN1EncodingException - Thrown if the data encountered is not in the expected format.
EOFException - Thrown when the end of the stream is reached.
IOException - Thrown in the case of an I/O error.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readUTCTime

public long readUTCTime(int tagging,
                        int tag,
                        long defaultValue)
                 throws ASN1EncodingException,
                        EOFException,
                        IOException
Returns an ASN.1 explicit time object from the input. Currently this only supports the YYMMDDhhmmZ UTC time format.

This handles UTC time.

Parameters:
tagging - Whether this is DERTags.TAG_IMPLICIT, DERTags.TAG_EXPLICIT or DERTags.TAG_NONE.
tag - The tag to look for.
defaultValue - A default Value to return if not a date.
Returns:
The time as a long
Throws:
ASN1EncodingException - Thrown if the data encountered is not in the expected format.
EOFException - Thrown when the end of the stream is reached.
IOException - Thrown in the case of an I/O error.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readUTF8String

public String readUTF8String()
                      throws ASN1EncodingException,
                             EOFException,
                             IOException
Reads a UTF8 string in from the ASN1 input stream.

Returns:
The String.
Throws:
ASN1EncodingException - Thrown if the string could not be found or was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readUTF8String

public String readUTF8String(int tagging,
                             int tag)
                      throws ASN1EncodingException,
                             EOFException,
                             IOException
Reads a UTF8 string in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
Returns:
The String value, or default value if the expected tag could not be found.
Throws:
ASN1EncodingException - Thrown if the string was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readUTF8String

public String readUTF8String(int tagging,
                             int tag,
                             int clsFlags)
                      throws ASN1EncodingException,
                             EOFException,
                             IOException
Reads a UTF8 string in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
clsFlags - The class flag to check for ( either DERTags.UNIVERSAL_CLASS_FLAG, DERTags.APPLICATION_SPECIFIC_CLASS_FLAG, DERTags.CONTEXT_SPECIFIC_CLASS_FLAG or DERTags.PRIVATE_CLASS_FLAG )
Returns:
The String value, or default value if the expected tag could not be found.
Throws:
ASN1EncodingException - Thrown if the String was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readUTF8String

public String readUTF8String(int tagging,
                             int tag,
                             int clsFlags,
                             String defaultValue)
                      throws ASN1EncodingException,
                             EOFException,
                             IOException
Reads a UTF8 string in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
clsFlags - The class flag to check for ( either DERTags.UNIVERSAL_CLASS_FLAG, DERTags.APPLICATION_SPECIFIC_CLASS_FLAG, DERTags.CONTEXT_SPECIFIC_CLASS_FLAG or DERTags.PRIVATE_CLASS_FLAG )
defaultValue - The value to return if the tag cannot be found.
Returns:
The String value, or default value if the expected tag could not be found.
Throws:
ASN1EncodingException - Thrown if the String was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

readUTF8String

public String readUTF8String(int tagging,
                             int tag,
                             String defaultValue)
                      throws ASN1EncodingException,
                             EOFException,
                             IOException
Reads a UTF8 string in from the ASN1 input stream with tagging.

Parameters:
tagging - The type of tagging to use (TAG_NONE, TAG_IMPLICIT, TAG_EXPLICIT).
tag - The tag value to look for (ignored if tagging is TAG_NONE).
defaultValue - The value to return if the tag cannot be found.
Returns:
The String value, or default value if the expected tag could not be found.
Throws:
ASN1EncodingException - Thrown if the String was incorrectly formatted.
EOFException - Thrown if the end of the stream was reached.
IOException - Thrown if an I/O error was encountered.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

skipField

public void skipField()
               throws IOException,
                      ASN1EncodingException
Skips the current field.

A field consists of a tag, length and data value.

Calling this function on an octet string would skip over the tag of the octet string, the length of the octet string, and the contents of the octet string.

So an example of a field would be { 0x04, 0x02, 0x12, 0x34 } where 0x04 is the octet string tag, 0x02 is the length of the data, and 0x1234 is the data. Skipfield will skip over all 4 bytes.

Throws:
IOException - Thrown if an I/O error occurs.
ASN1EncodingException - Thrown if the data encountered is not in the expected format.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

skipField

public void skipField(int tag)
               throws IOException,
                      ASN1EncodingException
Skips the current field.

It also checks that the passed in tag is the correct one found in the encoding. A field consists of a tag, length and data value. So calling this function on an octet string would skip over the tag of the octet string ( 0x04 ), the length of the octet string, and the contents of the octet string.

Parameters:
tag - An integer representing the field tag.
Throws:
IOException - Thrown if an I/O error occurs.
ASN1EncodingException - Thrown if the data encountered is not in the expected format.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.



Copyright 1999-2009 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.