com.h3c.util.snmp.command

## Class SnmpAbstractCodec<E>

- java.lang.Object
- - com.h3c.util.snmp.command.SnmpAbstractDecoder<E>
  - - com.h3c.util.snmp.command.SnmpAbstractCodec<E>

- Type Parameters:
    `E` - Type of the element to encode.
  All Implemented Interfaces:
    Codec<E,SnmpField>, Decoder<E,SnmpField>

      public abstract class SnmpAbstractCodec<E>
      extends SnmpAbstractDecoder<E>
      implements Codec<E,SnmpField>

  SNMP abstract codec.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SnmpAbstractCodec()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected SnmpField` | `encodePrimitive(byte[] value)` Encodes a value.
    `protected SnmpField` | `encodePrimitive(int value)` Encodes a value.
    `protected SnmpField` | `encodePrimitive(IpAddress value)` Encodes a value.
    `protected SnmpField` | `encodePrimitive(long value)` Encodes a value.
    `protected SnmpField` | `encodePrimitive(MacAddress value)` Encodes a value.
    `protected SnmpField` | `encodePrimitive(String value)` Encodes a value.

    - ### Methods inherited from class com.h3c.util.snmp.command.SnmpAbstractDecoder

      `decodePrimitiveAsBytes, decodePrimitiveAsInt, decodePrimitiveAsIpAddress, decodePrimitiveAsLong, decodePrimitiveAsMacAddress, decodePrimitiveAsString`

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

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

    - ### Methods inherited from interface com.h3c.util.snmp.command.Codec

      `encode`

    - ### Methods inherited from interface com.h3c.util.snmp.command.Decoder

      `decode`

- - ### Constructor Detail

    - #### SnmpAbstractCodec

          public SnmpAbstractCodec()

  - ### Method Detail

    - #### encodePrimitive

          protected SnmpField encodePrimitive(int value)

      Encodes a value.
      Parameters:
        `value` - Value to encode.
      Returns:
        Encoded value.

    - #### encodePrimitive

          protected SnmpField encodePrimitive(long value)

      Encodes a value.
      Parameters:
        `value` - Value to encode.
      Returns:
        Encoded value.

    - #### encodePrimitive

          protected SnmpField encodePrimitive(String value)

      Encodes a value.
      Parameters:
        `value` - Value to encode.
      Returns:
        Encoded value.

    - #### encodePrimitive

          protected SnmpField encodePrimitive(IpAddress value)
                                       throws NullPointerException

      Encodes a value.
      Parameters:
        `value` - Value to encode.
      Returns:
        Encoded value.
      Throws:
        `NullPointerException` - if `value` is null.

    - #### encodePrimitive

          protected SnmpField encodePrimitive(MacAddress value)
                                       throws NullPointerException

      Encodes a value.
      Parameters:
        `value` - Value to encode.
      Returns:
        Encoded value.
      Throws:
        `NullPointerException` - if `value` is null.

    - #### encodePrimitive

          protected SnmpField encodePrimitive(byte[] value)

      Encodes a value.
      Parameters:
        `value` - Value to encode.
      Returns:
        Encoded value.

Copyright © 2014. All Rights Reserved.