Module org.snmp4j

Interface BERSerializable

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void decodeBER​(BERInputStream inputStream)
      Decodes a Variable from an InputStream.
      void encodeBER​(java.io.OutputStream outputStream)
      Encodes a Variable to an OutputStream.
      int getBERLength()
      Returns the length of this BERSerializable object in bytes when encoded according to the Basic Encoding Rules (BER).
      int getBERPayloadLength()
      Returns the length of the payload of this BERSerializable object in bytes when encoded according to the Basic Encoding Rules (BER).
    • Method Detail

      • getBERLength

        int getBERLength()
        Returns the length of this BERSerializable object in bytes when encoded according to the Basic Encoding Rules (BER).
        Returns:
        the BER encoded length of this variable.
      • getBERPayloadLength

        int getBERPayloadLength()
        Returns the length of the payload of this BERSerializable object in bytes when encoded according to the Basic Encoding Rules (BER).
        Returns:
        the BER encoded length of this variable.
      • decodeBER

        void decodeBER​(BERInputStream inputStream)
                throws java.io.IOException
        Decodes a Variable from an InputStream.
        Parameters:
        inputStream - an InputStream containing a BER encoded byte stream.
        Throws:
        java.io.IOException - if the stream could not be decoded by using BER rules.
      • encodeBER

        void encodeBER​(java.io.OutputStream outputStream)
                throws java.io.IOException
        Encodes a Variable to an OutputStream.
        Parameters:
        outputStream - an OutputStream.
        Throws:
        java.io.IOException - if an error occurs while writing to the stream.