|
MySQL Connector/J size='-1'>5.1.6 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mysql.jdbc.Util
public class Util
Various utility methods for the driver.
Field Summary | |
---|---|
protected static java.lang.reflect.Method |
systemNanoTimeMethod
|
Constructor Summary | |
---|---|
Util()
|
Method Summary | |
---|---|
static java.util.Map |
calculateDifferences(java.util.Map map1,
java.util.Map map2)
|
static java.lang.Object |
cast(java.lang.Object invokeOn,
java.lang.Object toCast)
Reflexive access on JDK-1.5's Class.cast() method so we don't have to move that out into separate classes built for JDBC-4.0. |
static long |
getCurrentTimeNanosOrMillis()
|
static java.lang.Object |
getInstance(java.lang.String className,
java.lang.Class[] argTypes,
java.lang.Object[] args)
|
static java.lang.Object |
handleNewInstance(java.lang.reflect.Constructor ctor,
java.lang.Object[] args)
Handles constructing new instance with the given constructor and wrapping (or not, as required) the exceptions that could possibly be generated |
static boolean |
interfaceExists(java.lang.String hostname)
Does a network interface exist locally with the given hostname? |
static boolean |
isColdFusion()
|
static boolean |
isJdbc4()
|
static java.util.List |
loadExtensions(Connection conn,
java.util.Properties props,
java.lang.String extensionClassNames,
java.lang.String errorMessageKey)
|
static boolean |
nanoTimeAvailable()
|
static java.lang.Object |
readObject(java.sql.ResultSet resultSet,
int index)
Given a ResultSet and an index into the columns of that ResultSet, read binary data from the column which represents a serialized object, and re-create the object. |
static void |
resultSetToMap(java.util.Map mappedValues,
java.sql.ResultSet rs)
|
static java.lang.String |
scramble(java.lang.String message,
java.lang.String password)
DOCUMENT ME! |
static java.lang.String |
stackTraceToString(java.lang.Throwable ex)
Converts a nested exception into a nicer message |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static java.lang.reflect.Method systemNanoTimeMethod
Constructor Detail |
---|
public Util()
Method Detail |
---|
public static boolean nanoTimeAvailable()
public static boolean isJdbc4()
public static boolean isColdFusion()
public static java.lang.Object readObject(java.sql.ResultSet resultSet, int index) throws java.lang.Exception
resultSet
- the ResultSet to use.index
- an index into the ResultSet.
java.lang.Exception
- if an error occurspublic static java.lang.String scramble(java.lang.String message, java.lang.String password)
message
- DOCUMENT ME!password
- DOCUMENT ME!
public static java.lang.String stackTraceToString(java.lang.Throwable ex)
ex
- the exception to expand into a message.
public static java.lang.Object getInstance(java.lang.String className, java.lang.Class[] argTypes, java.lang.Object[] args) throws java.sql.SQLException
java.sql.SQLException
public static final java.lang.Object handleNewInstance(java.lang.reflect.Constructor ctor, java.lang.Object[] args) throws java.sql.SQLException
java.sql.SQLException
public static boolean interfaceExists(java.lang.String hostname)
hostname
- the hostname (or IP address in string form) to check
public static java.lang.Object cast(java.lang.Object invokeOn, java.lang.Object toCast)
invokeOn
- toCast
-
public static long getCurrentTimeNanosOrMillis()
public static void resultSetToMap(java.util.Map mappedValues, java.sql.ResultSet rs) throws java.sql.SQLException
java.sql.SQLException
public static java.util.Map calculateDifferences(java.util.Map map1, java.util.Map map2)
public static java.util.List loadExtensions(Connection conn, java.util.Properties props, java.lang.String extensionClassNames, java.lang.String errorMessageKey) throws java.sql.SQLException
java.sql.SQLException
|
MySQL Connector/J size='-1'>5.1.6 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |