cryptix.asn1.lang
public class Tag extends Object
Copyright ©1997, 1998, 1999
Systemics Ltd on behalf of the
Cryptix Development Team.
All rights reserved.
$Revision: 1.3 $
Field Summary | |
---|---|
static int | APPLICATION |
static int | BIT_STRING |
static int | BOOLEAN |
int | clazz |
boolean | constructed |
static int | CONTEXT |
boolean | explicit |
static int | IA5_STRING |
static int | INTEGER |
static int | NULL |
static int | OBJECT_IDENTIFIER |
static int | OCTET_STRING |
static int | PRINT_STRING |
static int | PRIVATE |
static int | SEQUENCE |
static int | SEQUENCE_OF |
static int | SET |
static int | SET_OF |
static int | T61_STRING |
static int | UNIVERSAL |
static int | UTC_TIME |
int | value |
Constructor Summary | |
---|---|
Tag(int clazz, int value, boolean explicit, boolean constructed)
Constructs an ASN.1 Tag instance.
| |
Tag(int clazz, int value, boolean explicit)
Convenience constructor. | |
Tag(int value, boolean explicit)
Convenience constructor. |
Method Summary | |
---|---|
static Tag | decode(InputStream in)
Constructs a Tag instance from the designated
input stream.
|
int | getClazz() Returns the tag's class. |
static Tag | getExpectedTag(int expectedClass, int expectedValue, InputStream in)
Returns the tag element of an ASN.1 object if it is of the
designated expected class and type, or null otherwise. |
static Tag | getExpectedTag(int expectedValue, InputStream in)
Convenience method similar to the method with same name and 3
arguments, except it assumes that the tag's class is UNIVERSAL.
|
static Tag | getExpectedTag(Tag tag, InputStream in)
Convenience method similar to the method with same name and 3
arguments, except it uses the given tag's class and value.
|
static byte[] | getTag(InputStream in)
Get a tag off the wire as a byte[] |
int | getValue() Returns the tag's class number. |
boolean | isConstructed() Returns true if the tag is constructed false otherwise. |
boolean | isExplicit() Returns true if the tag is explicit, false otherwise. |
static Tag | peek(InputStream in)
Returns the Tag instance parsed from the given input stream,
if one is there, without modifying the stram marker.
|
String | toString() |
Parameters: clazz The tag's class, default is UNIVERSAL. value The tag's value. explicit Whether this tag is explicit or implicit. constructed Whether this tag is constructed or not. Default is not constrcuted.
Parameters: clazz The tag's class, default is UNIVERSAL. value The tag's value. explicit Whether this tag is explicit or implicit.
Parameters: value The tag's value. explicit Whether this tag is explicit or implicit.
Tag
instance from the designated
input stream.
Parameters: in The input stream.
Returns: A Tag
instance parsed from an input
stream.
Throws: IOException If an error occurs while parsing the input stream.
Parameters: expectedClass The tag's class expected to be found at the current marker location of the given input stream. expectedValue The tag's number expected to be found at the current marker location of the given input stream. in The input source stream.
Returns: An instance of the Tag
class containing
the concrete Tag
instance found in the
input stream.
Parameters: expectedValue The tag's number expected to be found at the current marker location of the given input stream. in The input source stream.
Returns: An instance of the Tag
class containing
the concrete Tag
instance found in the
input stream.
Parameters: tag The tag's instance (class and value) expected to be found at the current marker location of the given input stream. in The input source stream.
Returns: An instance of the Tag
class containing
the concrete Tag
instance found in the
input stream.
byte[]
Parameters: in The input stream
Returns: a byte
with the tag bytes
Throws: IOException --EKR
Parameters: in The input stream.
Returns: A Tag
instance parsed from the designated
input stream.
Throws: IOException If an error occurs while parsing the input stream.