パッケージ org.postgresql.util

インタフェース PGBinaryObject

既知の実装クラスのリスト:
PGbox, PGpoint

public interface PGBinaryObject
PGBinaryObject is a interface that classes extending PGobject can use to take advantage of more optimal binary encoding of the data type.
  • メソッドの概要

    修飾子とタイプ
    メソッド
    説明
    int
    This method is called to return the number of bytes needed to store this object in the binary form required by org.postgresql.
    void
    setByteValue(byte[] value, int offset)
    This method is called to set the value of this object.
    void
    toBytes(byte[] bytes, int offset)
    This method is called the to store the value of the object, in the binary form required by org.postgresql.
  • メソッドの詳細

    • setByteValue

      void setByteValue(byte[] value, int offset) throws SQLException
      This method is called to set the value of this object.
      パラメータ:
      value - data containing the binary representation of the value of the object
      offset - the offset in the byte array where object data starts
      例外:
      SQLException - thrown if value is invalid for this type
    • lengthInBytes

      int lengthInBytes()
      This method is called to return the number of bytes needed to store this object in the binary form required by org.postgresql.
      戻り値:
      the number of bytes needed to store this object
    • toBytes

      void toBytes(byte[] bytes, int offset)
      This method is called the to store the value of the object, in the binary form required by org.postgresql.
      パラメータ:
      bytes - the array to store the value, it is guaranteed to be at lest lengthInBytes() in size.
      offset - the offset in the byte array where object must be stored