Class PGbytea

java.lang.Object
org.postgresql.util.PGbytea

public class PGbytea extends Object
Converts to and from the postgresql bytea datatype used by the backend.
  • Field Details

    • MAX_3_BUFF_SIZE

      private static final int MAX_3_BUFF_SIZE
      See Also:
    • HEX_VALS

      private static final int[] HEX_VALS
      Lookup table for each of the valid ascii code points (offset by '0') to the 4 bit numeric value.
  • Constructor Details

    • PGbytea

      public PGbytea()
  • Method Details

    • toBytes

      public static byte[] toBytes(byte[] s) throws SQLException
      Throws:
      SQLException
    • toBytesHexEscaped

      private static byte[] toBytesHexEscaped(byte[] s)
    • getHex

      private static int getHex(byte b)
    • toBytesOctalEscaped

      private static byte[] toBytesOctalEscaped(byte[] s)
    • toPGString

      public static String toPGString(byte[] buf)