com.beanit.asn1bean.ber

## Class BerTag

- java.lang.Object
- - com.beanit.asn1bean.ber.BerTag

- All Implemented Interfaces:
    java.io.Serializable

      public class BerTag
      extends java.lang.Object
      implements java.io.Serializable

  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `APPLICATION_CLASS`
    `static int` | `BIT_STRING_TAG`
    `static int` | `BMP_STRING_TAG`
    `static int` | `BOOLEAN_TAG`
    `static int` | `CONSTRUCTED`
    `static int` | `CONTEXT_CLASS`
    `static int` | `DATE_TAG`
    `static int` | `DATE_TIME_TAG`
    `static int` | `DURATION_TAG`
    `static int` | `ENUMERATED_TAG`
    `static int` | `GENERAL_STRING_TAG`
    `static int` | `GENERALIZED_TIME_TAG`
    `static int` | `GRAPHIC_STRING_TAG`
    `static int` | `IA5_STRING_TAG`
    `static int` | `INTEGER_TAG`
    `static int` | `NULL_TAG`
    `static int` | `NUMERIC_STRING_TAG`
    `static int` | `OBJECT_DESCRIPTOR_TAG`
    `static int` | `OBJECT_IDENTIFIER_TAG`
    `static int` | `OCTET_STRING_TAG`
    `int` | `primitive`
    `static int` | `PRIMITIVE`
    `static int` | `PRINTABLE_STRING_TAG`
    `static int` | `PRIVATE_CLASS`
    `static int` | `REAL_TAG`
    `static BerTag` | `SEQUENCE`
    `static int` | `SEQUENCE_TAG`
    `static BerTag` | `SET`
    `static int` | `SET_TAG`
    `byte[]` | `tagBytes`
    `int` | `tagClass`
    `int` | `tagNumber`
    `static int` | `TELETEX_STRING_TAG`
    `static int` | `TIME_OF_DAY_TAG`
    `static int` | `TIME_TAG`
    `static int` | `UNIVERSAL_CLASS`
    `static int` | `UNIVERSAL_STRING_TAG`
    `static int` | `UTC_TIME_TAG`
    `static int` | `UTF8_STRING_TAG`
    `static int` | `VIDEOTEX_STRING_TAG`
    `static int` | `VISIBLE_STRING_TAG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BerTag()`
    `BerTag(int identifierClass, int primitive, int tagNumber)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `decode(java.io.InputStream is)`
    `int` | `decode(java.io.InputStream is, java.io.OutputStream os)`
    `int` | `decodeAndCheck(java.io.InputStream is)` Decodes the Identifier from the ByteArrayInputStream and throws an Exception if it is not equal to itself.
    `int` | `encode(java.io.OutputStream reverseOS)`
    `int` | `encodeForwards(java.io.OutputStream os)`
    `boolean` | `equals(int identifierClass, int primitive, int tagNumber)`
    `boolean` | `equals(java.lang.Object obj)`
    `int` | `hashCode()`
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### UNIVERSAL_CLASS

          public static final int UNIVERSAL_CLASS

      See Also:
        Constant Field Values

    - #### APPLICATION_CLASS

          public static final int APPLICATION_CLASS

      See Also:
        Constant Field Values

    - #### CONTEXT_CLASS

          public static final int CONTEXT_CLASS

      See Also:
        Constant Field Values

    - #### PRIVATE_CLASS

          public static final int PRIVATE_CLASS

      See Also:
        Constant Field Values

    - #### PRIMITIVE

          public static final int PRIMITIVE

      See Also:
        Constant Field Values

    - #### CONSTRUCTED

          public static final int CONSTRUCTED

      See Also:
        Constant Field Values

    - #### BOOLEAN_TAG

          public static final int BOOLEAN_TAG

      See Also:
        Constant Field Values

    - #### INTEGER_TAG

          public static final int INTEGER_TAG

      See Also:
        Constant Field Values

    - #### BIT_STRING_TAG

          public static final int BIT_STRING_TAG

      See Also:
        Constant Field Values

    - #### OCTET_STRING_TAG

          public static final int OCTET_STRING_TAG

      See Also:
        Constant Field Values

    - #### NULL_TAG

          public static final int NULL_TAG

      See Also:
        Constant Field Values

    - #### OBJECT_IDENTIFIER_TAG

          public static final int OBJECT_IDENTIFIER_TAG

      See Also:
        Constant Field Values

    - #### OBJECT_DESCRIPTOR_TAG

          public static final int OBJECT_DESCRIPTOR_TAG

      See Also:
        Constant Field Values

    - #### REAL_TAG

          public static final int REAL_TAG

      See Also:
        Constant Field Values

    - #### ENUMERATED_TAG

          public static final int ENUMERATED_TAG

      See Also:
        Constant Field Values

    - #### UTF8_STRING_TAG

          public static final int UTF8_STRING_TAG

      See Also:
        Constant Field Values

    - #### TIME_TAG

          public static final int TIME_TAG

      See Also:
        Constant Field Values

    - #### SEQUENCE_TAG

          public static final int SEQUENCE_TAG

      See Also:
        Constant Field Values

    - #### SET_TAG

          public static final int SET_TAG

      See Also:
        Constant Field Values

    - #### NUMERIC_STRING_TAG

          public static final int NUMERIC_STRING_TAG

      See Also:
        Constant Field Values

    - #### PRINTABLE_STRING_TAG

          public static final int PRINTABLE_STRING_TAG

      See Also:
        Constant Field Values

    - #### TELETEX_STRING_TAG

          public static final int TELETEX_STRING_TAG

      See Also:
        Constant Field Values

    - #### VIDEOTEX_STRING_TAG

          public static final int VIDEOTEX_STRING_TAG

      See Also:
        Constant Field Values

    - #### IA5_STRING_TAG

          public static final int IA5_STRING_TAG

      See Also:
        Constant Field Values

    - #### UTC_TIME_TAG

          public static final int UTC_TIME_TAG

      See Also:
        Constant Field Values

    - #### GENERALIZED_TIME_TAG

          public static final int GENERALIZED_TIME_TAG

      See Also:
        Constant Field Values

    - #### GRAPHIC_STRING_TAG

          public static final int GRAPHIC_STRING_TAG

      See Also:
        Constant Field Values

    - #### VISIBLE_STRING_TAG

          public static final int VISIBLE_STRING_TAG

      See Also:
        Constant Field Values

    - #### GENERAL_STRING_TAG

          public static final int GENERAL_STRING_TAG

      See Also:
        Constant Field Values

    - #### UNIVERSAL_STRING_TAG

          public static final int UNIVERSAL_STRING_TAG

      See Also:
        Constant Field Values

    - #### BMP_STRING_TAG

          public static final int BMP_STRING_TAG

      See Also:
        Constant Field Values

    - #### DATE_TAG

          public static final int DATE_TAG

      See Also:
        Constant Field Values

    - #### TIME_OF_DAY_TAG

          public static final int TIME_OF_DAY_TAG

      See Also:
        Constant Field Values

    - #### DATE_TIME_TAG

          public static final int DATE_TIME_TAG

      See Also:
        Constant Field Values

    - #### DURATION_TAG

          public static final int DURATION_TAG

      See Also:
        Constant Field Values

    - #### SEQUENCE

          public static final BerTag SEQUENCE

    - #### SET

          public static final BerTag SET

    - #### tagBytes

          public byte[] tagBytes

    - #### tagClass

          public int tagClass

    - #### primitive

          public int primitive

    - #### tagNumber

          public int tagNumber

  - ### Constructor Detail

    - #### BerTag

          public BerTag(int identifierClass,
                        int primitive,
                        int tagNumber)

    - #### BerTag

          public BerTag()

  - ### Method Detail

    - #### encode

          public int encode(java.io.OutputStream reverseOS)
                     throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### encodeForwards

          public int encodeForwards(java.io.OutputStream os)
                             throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### decode

          public int decode(java.io.InputStream is)
                     throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### decode

          public int decode(java.io.InputStream is,
                            java.io.OutputStream os)
                     throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### decodeAndCheck

          public int decodeAndCheck(java.io.InputStream is)
                             throws java.io.IOException

      Decodes the Identifier from the ByteArrayInputStream and throws an Exception if it is not equal to itself. Returns the number of bytes read from the InputStream.
      Parameters:
        `is` - the input stream to read the identifier from.
      Returns:
        the length of the identifier read.
      Throws:
        `java.io.IOException` - if an exception occurs reading the identifier from the stream.

    - #### equals

          public boolean equals(int identifierClass,
                                int primitive,
                                int tagNumber)

    - #### equals

          public boolean equals(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`