public class Utils
extends java.lang.Object
| Constructor and Description |
|---|
Utils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.StringBuffer |
appendEscapedIdentifier(java.lang.StringBuffer sbuf,
java.lang.String value)
Escape the given identifier value and append it to the string
buffer * sbuf.
|
static java.lang.StringBuffer |
appendEscapedLiteral(java.lang.StringBuffer sbuf,
java.lang.String value,
boolean standardConformingStrings)
Escape the given literal value and append it to the string buffer
sbuf.
|
static byte[] |
encodeUTF8(java.lang.String str)
Encode a string as UTF-8.
|
static java.lang.String |
toHexString(byte[] data)
Turn a bytearray into a printable form, representing
each byte in hex.
|
public static java.lang.String toHexString(byte[] data)
data - the bytearray to stringizedatapublic static byte[] encodeUTF8(java.lang.String str)
str - the string to encodestrpublic static java.lang.StringBuffer appendEscapedLiteral(java.lang.StringBuffer sbuf,
java.lang.String value,
boolean standardConformingStrings)
throws java.sql.SQLException
sbuf - the string buffer to append to; or nullvalue - the string valuestandardConformingStrings - java.sql.SQLException - if the string contains a \0 characterpublic static java.lang.StringBuffer appendEscapedIdentifier(java.lang.StringBuffer sbuf,
java.lang.String value)
throws java.sql.SQLException
sbuf - the string buffer to append to; or nullvalue - the string valuejava.sql.SQLException - if the string contains a \0 character