com.beanit.asn1bean.ber

## Class BerLength

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

- All Implemented Interfaces:
    java.io.Serializable

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

  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `int` | `val`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BerLength()`

  - ### Method Summary

    All Methods Static 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)`
    `static int` | `encodeLength(java.io.OutputStream reverseOS, int length)`
    `static int` | `readEocByte(java.io.InputStream is)`
    `static int` | `readEocByte(java.io.InputStream is, java.io.OutputStream os)`
    `int` | `readEocIfIndefinite(java.io.InputStream is)` Reads the end of contents octets from the given input stream if this length object has the indefinite form.

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### val

          public int val

  - ### Constructor Detail

    - #### BerLength

          public BerLength()

  - ### Method Detail

    - #### encodeLength

          public static int encodeLength(java.io.OutputStream reverseOS,
                                         int length)
                                  throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### readEocByte

          public static int readEocByte(java.io.InputStream is)
                                 throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### readEocByte

          public static int readEocByte(java.io.InputStream is,
                                        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`

    - #### readEocIfIndefinite

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

      Reads the end of contents octets from the given input stream if this length object has the indefinite form.
      Parameters:
        `is` - the input stream
      Returns:
        the number of bytes read from the input stream
      Throws:
        `java.io.IOException` - if an error occurs while reading from the input stream