com.mysql.jdbc
Class Util

java.lang.Object
  extended bycom.mysql.jdbc.Util

public class Util
extends java.lang.Object

Various utility methods for the driver.


Nested Class Summary
(package private)  class Util.RandStructcture
           
 
Constructor Summary
Util()
           
 
Method Summary
(package private) static java.lang.String newCrypt(java.lang.String password, java.lang.String seed)
           
(package private) static long[] newHash(java.lang.String password)
           
(package private) static java.lang.String oldCrypt(java.lang.String password, java.lang.String seed)
           
(package private) static long oldHash(java.lang.String password)
           
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 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
 

Constructor Detail

Util

public Util()
Method Detail

readObject

public static java.lang.Object readObject(java.sql.ResultSet resultSet,
                                          int index)
                                   throws java.lang.Exception
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.

Parameters:
resultSet - the ResultSet to use.
index - an index into the ResultSet.
Returns:
the object if it can be de-serialized
Throws:
java.lang.Exception - if an error occurs

scramble

public static java.lang.String scramble(java.lang.String message,
                                        java.lang.String password)
DOCUMENT ME!

Parameters:
message - DOCUMENT ME!
password - DOCUMENT ME!
Returns:
DOCUMENT ME!

stackTraceToString

public static java.lang.String stackTraceToString(java.lang.Throwable ex)
Converts a nested exception into a nicer message

Parameters:
ex - the exception to expand into a message.
Returns:
a message containing the exception, the message (if any), and a stacktrace.

newCrypt

static java.lang.String newCrypt(java.lang.String password,
                                 java.lang.String seed)

newHash

static long[] newHash(java.lang.String password)

oldCrypt

static java.lang.String oldCrypt(java.lang.String password,
                                 java.lang.String seed)

oldHash

static long oldHash(java.lang.String password)