Interface FieldAdapter

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.math.BigInteger getBigInteger​(byte[] buf, int offset, int length, int startBit, int stopBit)
      Gets the field value as a Java BigInteger.
      byte getByte​(byte[] buf, int offset, int length, int startBit, int stopBit)
      Gets the field value as a Java byte.
      double getDouble​(byte[] buf, int offset, int length, int startBit, int stopBit)
      Gets the field value as a Java double.
      float getFloat​(byte[] buf, int offset, int length, int startBit, int stopBit)
      Gets the field value as a Java float.
      int getInt​(byte[] buf, int offset, int length, int startBit, int stopBit)
      Gets the field value as a Java int.
      long getLong​(byte[] buf, int offset, int length, int startBit, int stopBit)
      Gets the field value as a Java long.
      short getShort​(byte[] buf, int offset, int length, int startBit, int stopBit)
      Gets the field value as a Java short.
      java.lang.String getString​(byte[] buf, int offset, int length, int startBit, int stopBit)
      Gets the field value as a Java string, using the US-ASCII character set to convert from bytes to characters.
      java.lang.String getString​(byte[] buf, int offset, int length, int startBit, int stopBit, java.nio.charset.Charset charset)
      Gets the field value as a Java string, using a specified character set to convert from bytes to characters.
      void setBigInteger​(java.math.BigInteger value, int offset, int length, java.nio.ByteBuffer buffer, boolean isRightJustified)
      Sets the field value as a Java BigInteger.
      void setByte​(byte value, int offset, int length, java.nio.ByteBuffer buffer, boolean isRightJustified)
      Sets the field value as a Java byte.
      void setDouble​(double value, int offset, int length, java.nio.ByteBuffer buffer, boolean isRightJustified)
      Sets the field value as a Java double.
      void setFloat​(float value, int offset, int length, java.nio.ByteBuffer buffer, boolean isRightJustified)
      Sets the field value as a Java float.
      void setInt​(int value, int offset, int length, java.nio.ByteBuffer buffer, boolean isRightJustified)
      Sets the field value as a Java int.
      void setLong​(long value, int offset, int length, java.nio.ByteBuffer buffer, boolean isRightJustified)
      Sets the field value as a Java long.
      void setShort​(short value, int offset, int length, java.nio.ByteBuffer buffer, boolean isRightJustified)
      Sets the field value as a Java short.
      void setString​(java.lang.String value, int offset, int length, java.nio.ByteBuffer buffer, boolean isRightJustified)
      Sets the field value as a Java string.
      void setString​(java.lang.String value, int offset, int length, java.nio.ByteBuffer buffer, boolean isRightJustified, java.nio.charset.Charset charset)
      Sets the field value as a Java string, using a specified character set to convert from characters to bytes.
    • Method Detail

      • getByte

        byte getByte​(byte[] buf,
                     int offset,
                     int length,
                     int startBit,
                     int stopBit)
        Gets the field value as a Java byte.
        Parameters:
        buf - the byte array containing the field
        offset - the field offset
        length - the length of the field data
        startBit - the start bit, for bit fields
        stopBit - the stop bit, for bit fields
        Returns:
        the field value, as a short
      • getShort

        short getShort​(byte[] buf,
                       int offset,
                       int length,
                       int startBit,
                       int stopBit)
        Gets the field value as a Java short.
        Parameters:
        buf - the byte array containing the field
        offset - the field offset
        length - the length of the field data
        startBit - the start bit, for bit fields
        stopBit - the stop bit, for bit fields
        Returns:
        the field value, as a short
      • getInt

        int getInt​(byte[] buf,
                   int offset,
                   int length,
                   int startBit,
                   int stopBit)
        Gets the field value as a Java int.
        Parameters:
        buf - the byte array containing the field
        offset - the field offset
        length - the length of the field data
        startBit - the start bit, for bit fields
        stopBit - the stop bit, for bit fields
        Returns:
        the field value, as an int
      • getLong

        long getLong​(byte[] buf,
                     int offset,
                     int length,
                     int startBit,
                     int stopBit)
        Gets the field value as a Java long.
        Parameters:
        buf - the byte array containing the field
        offset - the field offset
        length - the length of the field data
        startBit - the start bit, for bit fields
        stopBit - the stop bit, for bit fields
        Returns:
        the field value, as a long
      • getBigInteger

        java.math.BigInteger getBigInteger​(byte[] buf,
                                           int offset,
                                           int length,
                                           int startBit,
                                           int stopBit)
        Gets the field value as a Java BigInteger.
        Parameters:
        buf - the byte array containing the field
        offset - the field offset
        length - the length of the field data
        startBit - the start bit, for bit fields
        stopBit - the stop bit, for bit fields
        Returns:
        the field value, as a BigInteger
      • getFloat

        float getFloat​(byte[] buf,
                       int offset,
                       int length,
                       int startBit,
                       int stopBit)
        Gets the field value as a Java float.
        Parameters:
        buf - the byte array containing the field
        offset - the field offset
        length - the length of the field data
        startBit - the start bit, for bit fields
        stopBit - the stop bit, for bit fields
        Returns:
        the field value, as a float
      • getDouble

        double getDouble​(byte[] buf,
                         int offset,
                         int length,
                         int startBit,
                         int stopBit)
        Gets the field value as a Java double.
        Parameters:
        buf - the byte array containing the field
        offset - the field offset
        length - the length of the field data
        startBit - the start bit, for bit fields
        stopBit - the stop bit, for bit fields
        Returns:
        the field value, as a double
      • getString

        java.lang.String getString​(byte[] buf,
                                   int offset,
                                   int length,
                                   int startBit,
                                   int stopBit)
        Gets the field value as a Java string, using the US-ASCII character set to convert from bytes to characters.
        Parameters:
        buf - the byte array containing the field
        offset - the field offset
        length - the length of the field data
        startBit - the start bit, for bit fields
        stopBit - the stop bit, for bit fields
        Returns:
        the field value, as a string
      • getString

        java.lang.String getString​(byte[] buf,
                                   int offset,
                                   int length,
                                   int startBit,
                                   int stopBit,
                                   java.nio.charset.Charset charset)
        Gets the field value as a Java string, using a specified character set to convert from bytes to characters.
        Parameters:
        buf - the byte array containing the field
        offset - the field offset
        length - the length of the field data
        startBit - the start bit, for bit fields
        stopBit - the stop bit, for bit fields
        charset - the character set to use when converting bytes to characters
        Returns:
        the field value, as a string
      • setString

        void setString​(java.lang.String value,
                       int offset,
                       int length,
                       java.nio.ByteBuffer buffer,
                       boolean isRightJustified)
        Sets the field value as a Java string.
        Parameters:
        value - the field value
        offset - the field offset
        length - the length of the value
        buffer - the byte buffer into which to set the value
        isRightJustified - true, if the string value should be right-justified
      • setString

        void setString​(java.lang.String value,
                       int offset,
                       int length,
                       java.nio.ByteBuffer buffer,
                       boolean isRightJustified,
                       java.nio.charset.Charset charset)
        Sets the field value as a Java string, using a specified character set to convert from characters to bytes.
        Parameters:
        value - the field value
        offset - the field offset
        length - the length of the value
        buffer - the byte buffer into which to set the value
        isRightJustified - true, if the string value should be right-justified
        charset - the character set to use when converting the string to bytes
      • setInt

        void setInt​(int value,
                    int offset,
                    int length,
                    java.nio.ByteBuffer buffer,
                    boolean isRightJustified)
        Sets the field value as a Java int.
        Parameters:
        value - the field value
        offset - the field offset
        length - the length of the value
        buffer - the byte buffer into which to set the value
        isRightJustified - true, if the string value should be right-justified
      • setDouble

        void setDouble​(double value,
                       int offset,
                       int length,
                       java.nio.ByteBuffer buffer,
                       boolean isRightJustified)
        Sets the field value as a Java double.
        Parameters:
        value - the field value
        offset - the field offset
        length - the length of the value
        buffer - the byte buffer into which to set the value
        isRightJustified - true, if the string value should be right-justified
      • setFloat

        void setFloat​(float value,
                      int offset,
                      int length,
                      java.nio.ByteBuffer buffer,
                      boolean isRightJustified)
        Sets the field value as a Java float.
        Parameters:
        value - the field value
        offset - the field offset
        length - the length of the value
        buffer - the byte buffer into which to set the value
        isRightJustified - true, if the string value should be right-justified
      • setShort

        void setShort​(short value,
                      int offset,
                      int length,
                      java.nio.ByteBuffer buffer,
                      boolean isRightJustified)
        Sets the field value as a Java short.
        Parameters:
        value - the field value
        offset - the field offset
        length - the length of the value
        buffer - the byte buffer into which to set the value
        isRightJustified - true, if the string value should be right-justified
      • setByte

        void setByte​(byte value,
                     int offset,
                     int length,
                     java.nio.ByteBuffer buffer,
                     boolean isRightJustified)
        Sets the field value as a Java byte.
        Parameters:
        value - the field value
        offset - the field offset
        length - the length of the value
        buffer - the byte buffer into which to set the value
        isRightJustified - true, if the string value should be right-justified
      • setLong

        void setLong​(long value,
                     int offset,
                     int length,
                     java.nio.ByteBuffer buffer,
                     boolean isRightJustified)
        Sets the field value as a Java long.
        Parameters:
        value - the field value
        offset - the field offset
        length - the length of the value
        buffer - the byte buffer into which to set the value
        isRightJustified - true, if the string value should be right-justified
      • setBigInteger

        void setBigInteger​(java.math.BigInteger value,
                           int offset,
                           int length,
                           java.nio.ByteBuffer buffer,
                           boolean isRightJustified)
        Sets the field value as a Java BigInteger.
        Parameters:
        value - the field value
        offset - the field offset
        length - the length of the value
        buffer - the byte buffer into which to set the value
        isRightJustified - true, if the string value should be right-justified