|
||||||||||
| 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 byte[] |
encodeUTF8(String str)
Encode a string as UTF-8. |
static StringBuilder |
escapeIdentifier(StringBuilder sbuf,
String value)
Escape the given identifier value and append it to the string builder sbuf. |
static StringBuilder |
escapeLiteral(StringBuilder sbuf,
String value,
boolean standardConformingStrings)
Escape the given literal value and append it to the string builder sbuf. |
static int |
parseServerVersionStr(String serverVersion)
Deprecated. use specific Version instance |
static 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 String toHexString(byte[] data)
data - the bytearray to stringize
datapublic static byte[] encodeUTF8(String str)
str - the string to encode
str
public static StringBuilder escapeLiteral(StringBuilder sbuf,
String value,
boolean standardConformingStrings)
throws SQLException
sbuf - the string builder to append to; or nullvalue - the string valuestandardConformingStrings - if standard conforming strings should be used
SQLException - if the string contains a \0 character
public static StringBuilder escapeIdentifier(StringBuilder sbuf,
String value)
throws SQLException
escapeLiteral(StringBuilder, String, boolean) does not.
sbuf - the string builder to append to; or nullvalue - the string value
SQLException - if the string contains a \0 character
@Deprecated
public static int parseServerVersionStr(String serverVersion)
throws NumberFormatException
Version instance
serverVersion - server vertion in a XXYYZZ form
NumberFormatException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||