Enum BinaryEncoding

java.lang.Object
java.lang.Enum<BinaryEncoding>
org.apache.sis.internal.sql.feature.BinaryEncoding
All Implemented Interfaces:
Serializable, Comparable<BinaryEncoding>, java.lang.constant.Constable

public enum BinaryEncoding extends Enum<BinaryEncoding>
The way binary data are encoded in a table column.
Since:
1.2
Version:
1.2
  • Enum Constant Details

    • RAW

      public static final BinaryEncoding RAW
      The bytes returned by the JDBC driver in a query are directly the binary data.
    • HEXADECIMAL

      public static final BinaryEncoding HEXADECIMAL
      The bytes returned by the JDBC driver are encoded as hexadecimal numbers.
  • Constructor Details

    • BinaryEncoding

      private BinaryEncoding()
  • Method Details

    • values

      public static BinaryEncoding[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static BinaryEncoding valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getBytes

      public byte[] getBytes(ResultSet results, int columnIndex) throws SQLException
      Returns the value in the specified column as an array of decoded bytes. If the bytes returned by the JDBC driver are encoded, this method decode them.
      Parameters:
      results - the result set from which to get the values.
      columnIndex - column from which to get the values.
      Returns:
      the column values, or null if none.
      Throws:
      SQLException - if an error occurred while fetching column values.
      See Also:
    • decode

      public InputStream decode(InputStream source)
      Returns an input stream decoding bytes on-the-fly.
      Parameters:
      source - the stream of data in their encoded format.
      Returns:
      a stream of decoded bytes.
      See Also: