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)
Deprecated.
prefer
toPGLiteral(Object, SqlSerializationContext) to clarify the behaviour
regarding InputStream objects |
static java.lang.String |
toPGLiteral(java.lang.Object value,
SqlSerializationContext context)
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 append@Deprecated
public static java.lang.String toPGLiteral(java.lang.Object value)
throws java.io.IOException
toPGLiteral(Object, SqlSerializationContext) to clarify the behaviour
regarding InputStream objectsbytea 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 valuepublic static java.lang.String toPGLiteral(java.lang.Object value,
SqlSerializationContext context)
throws java.io.IOException
bytea literal like '\xcafebabe'::bytea.
The following inputs are supported: byte[], StreamWrapper, and
ByteStreamWriter.value - input value to formatcontext - specifies configuration for converting the parameters to stringjava.io.IOException - in case there's underflow in the input valueCopyright © 2025 PostgreSQL Global Development Group. All rights reserved.