public class PGbytea
extends java.lang.Object
| Constructor and Description |
|---|
PGbytea() |
| Modifier and Type | Method and Description |
|---|---|
static void |
appendHexString(java.lang.StringBuilder sb,
byte[] buf,
int offset,
int length)
Appends given byte array as hex string.
|
static byte[] |
toBytes(byte[] s) |
static java.lang.String |
toPGLiteral(java.lang.Object value)
Formats input object as
bytea literal like '\xcafebabe'::bytea. |
static java.lang.String |
toPGString(byte[] buf) |
public static byte[] toBytes(byte[] s)
throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.lang.String toPGString(byte[] buf)
public static void appendHexString(java.lang.StringBuilder sb,
byte[] buf,
int offset,
int length)
sb - output builderbuf - buffer to appendoffset - offset within the bufferlength - the length of sequence to appendpublic static java.lang.String toPGLiteral(java.lang.Object value)
throws java.io.IOException
bytea literal like '\xcafebabe'::bytea.
The following inputs are supported: byte[], StreamWrapper, and
ByteStreamWriter.value - input value to formatjava.io.IOException - in case there's underflow in the input valueCopyright © 2025 PostgreSQL Global Development Group. All rights reserved.