org.firebirdsql.gds.ng.jna

## Class BigEndianDatatypeCoder

- java.lang.Object
- - org.firebirdsql.gds.ng.DefaultDatatypeCoder
  - - org.firebirdsql.gds.ng.jna.BigEndianDatatypeCoder

- All Implemented Interfaces:
    DatatypeCoder

      public final class BigEndianDatatypeCoder
      extends DefaultDatatypeCoder

  Datatype encoder and decoder for big endian platforms, specifically for use with the Firebird client library.

  For wire protocol use `DefaultDatatypeCoder`.

  Since:
    3.0
  Author:
    Mark Rotteveel

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.firebirdsql.gds.ng.DatatypeCoder

      `DatatypeCoder.RawDateTimeStruct`

  - ### Field Summary

    - ### Fields inherited from interface org.firebirdsql.gds.ng.DatatypeCoder

      `FRACTIONS_PER_HOUR, FRACTIONS_PER_MILLISECOND, FRACTIONS_PER_MINUTE, FRACTIONS_PER_SECOND, NANOSECONDS_PER_FRACTION`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BigEndianDatatypeCoder(IEncodingFactory encodingFactory)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `short` | `decodeShort(byte[] byte_int)` Decode a `byte` array into a `short` value.
    `byte[]` | `encodeShort(short value)` Encode a `short` value as a `byte` array.

    - ### Methods inherited from class org.firebirdsql.gds.ng.DefaultDatatypeCoder

      `decodeBoolean, decodeDate, decodeDate, decodeDateCalendar, decodeDateRaw, decodeDouble, decodeFloat, decodeInt, decodeLong, decodeString, decodeString, decodeTime, decodeTime, decodeTimeCalendar, decodeTimeRaw, decodeTimestamp, decodeTimestamp, decodeTimestamp, decodeTimestampCalendar, decodeTimestampRaw, encodeBoolean, encodeDate, encodeDate, encodeDateCalendar, encodeDateRaw, encodeDouble, encodeFloat, encodeInt, encodeLocalDate, encodeLocalDateTime, encodeLocalTime, encodeLong, encodeShort, encodeString, encodeString, encodeTime, encodeTime, encodeTimeCalendar, encodeTimeRaw, encodeTimestamp, encodeTimestamp, encodeTimestamp, encodeTimestampCalendar, encodeTimestampRaw, getEncodingFactory, intToBytes`

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

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

- - ### Constructor Detail

    - #### BigEndianDatatypeCoder

          public BigEndianDatatypeCoder(IEncodingFactory encodingFactory)

  - ### Method Detail

    - #### encodeShort

          public byte[] encodeShort(short value)

      Description copied from interface: `DatatypeCoder`
      Encode a `short` value as a `byte` array.
      Specified by:
        `encodeShort` in interface `DatatypeCoder`
      Overrides:
        `encodeShort` in class `DefaultDatatypeCoder`
      Parameters:
        `value` - The value to be encoded
      Returns:
        The value of `value` encoded as a `byte` array
      See Also:
        `DatatypeCoder.encodeShort(int)`

    - #### decodeShort

          public short decodeShort(byte[] byte_int)

      Description copied from interface: `DatatypeCoder`
      Decode a `byte` array into a `short` value.
      Specified by:
        `decodeShort` in interface `DatatypeCoder`
      Overrides:
        `decodeShort` in class `DefaultDatatypeCoder`
      Parameters:
        `byte_int` - The `byte` array to be decoded
      Returns:
        The `short` value of the decoded `byte` array

Copyright © 2001-2021 Jaybird (Firebird JDBC/JCA) team. All rights reserved.