|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.postgresql.core.Utils
public class Utils
Collection of utilities used by the protocol-level code.
| Constructor Summary | |
|---|---|
Utils()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Utils()
| Method Detail |
|---|
public static java.lang.String toHexString(byte[] data)
data - the bytearray to stringize
datapublic static byte[] encodeUTF8(java.lang.String str)
str - the string to encode
str
public 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 character
public 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 value
java.sql.SQLException - if the string contains a \0 character
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||