public class Helper
extends java.lang.Object
implements java.io.Serializable
Purpose: Define any usefull methods that are missing from the base Java.
Modifier and Type | Field and Description |
---|---|
protected static java.util.Vector |
calendarCache
PERF: Used to cache a set of calendars for conversion/printing purposes.
|
protected static java.lang.String |
CR
Store CR string, for some reason \n is not platform independent.
|
protected static java.lang.String |
CURRENT_WORKING_DIRECTORY
Prime the platform-dependent current working directory
|
protected static java.util.TimeZone |
defaultTimeZone
PERF: Cache default timezone for calendar conversion.
|
protected static java.lang.String |
FILE_SEPARATOR
Prime the platform-dependent file separator
|
protected static java.lang.Object |
nullWrapper
Used to store null values in hashtables, is helper because need to be serializable.
|
protected static java.lang.String |
PATH_SEPARATOR
Prime the platform-dependent path separator
|
protected static boolean |
shouldOptimizeDates
Used to configure JDBC level date optimization.
|
protected static java.lang.String |
TEMP_DIRECTORY
Prime the platform-dependent temporary directory
|
Constructor and Description |
---|
Helper() |
Modifier and Type | Method and Description |
---|---|
static void |
addAllToVector(java.util.Vector theVector,
java.util.List elementsToAdd) |
static void |
addAllToVector(java.util.Vector theVector,
java.util.Vector elementsToAdd) |
static java.util.Vector |
addAllUniqueToVector(java.util.Vector theVector,
java.util.Vector elementsToAdd) |
static java.util.Calendar |
allocateCalendar()
PERF: This is used to optimize Calendar conversion/printing.
|
static boolean |
areTypesAssignable(java.util.Vector types1,
java.util.Vector types2)
PUBLIC:
Compare two vectors of types.
|
static java.lang.Object[] |
arrayFromVector(java.util.Vector vector)
Convert the specified vector into an array.
|
static byte[] |
buildBytesFromHexString(java.lang.String hex)
Convert the HEX string to a byte array.
|
static java.util.Hashtable |
buildHashtableFromVector(java.util.Vector theVector)
Convert the passed Vector to a Hashtable
Return the Hashtable
|
static java.lang.String |
buildHexStringFromBytes(byte[] bytes)
Convert the byte array to a HEX string.
|
static java.util.Vector |
buildVectorFromHashtableElements(java.util.Hashtable hashtable)
Create a new Vector containing all of the hashtable elements
|
static java.util.Vector |
buildVectorFromHashtableElements(IdentityHashtable hashtable)
Create a new Vector containing all of the hashtable elements
|
static java.util.Vector |
buildVectorFromMapElements(java.util.Map map)
Create a new Vector containing all of the map elements.
|
static java.lang.String |
buildZeroPrefix(int number,
int totalDigits)
Build a numerical string with leading 0s.
|
static java.lang.String |
buildZeroPrefixAndTruncTrailZeros(int number,
int totalDigits)
Build a numerical string with leading 0s and truncate trailing zeros.
|
static java.util.Calendar |
calendarFromUtilDate(java.util.Date date)
Answer a Calendar from a date.
|
static boolean |
classImplementsInterface(java.lang.Class aClass,
java.lang.Class anInterface)
INTERNAL:
Return whether a Class implements a specific interface, either directly or indirectly
(through interface or implementation inheritance).
|
static boolean |
classIsSubclass(java.lang.Class subClass,
java.lang.Class superClass)
INTERNAL:
Return whether a Class is a subclass of, or the same as, another Class.
|
static boolean |
compareArrays(java.lang.Object[] array1,
java.lang.Object[] array2) |
static boolean |
compareBigDecimals(java.math.BigDecimal one,
java.math.BigDecimal two)
Compare two BigDecimals.
|
static boolean |
compareByteArrays(byte[] array1,
byte[] array2) |
static boolean |
compareCharArrays(char[] array1,
char[] array2) |
static boolean |
compareHashtables(java.util.Hashtable hashtable1,
java.util.Hashtable hashtable2)
PUBLIC:
Compare the elements in 2 hashtables to see if they are equal
Added Nov 9, 2000 JED Patch 2.5.1.8
|
static boolean |
compareOrderedVectors(java.util.Vector vector1,
java.util.Vector vector2)
Compare the elements in two
Vector s to see if they are equal. |
static boolean |
compareUnorderedVectors(java.util.Vector v1,
java.util.Vector v2)
Compare the elements in two
Vector s to see if they are equal. |
static java.util.Hashtable |
concatenateHashtables(java.util.Hashtable first,
java.util.Hashtable second) |
static java.util.Map |
concatenateMaps(java.util.Map first,
java.util.Map second)
Merge the two Maps into a new HashMap.
|
static java.util.Vector |
concatenateUniqueVectors(java.util.Vector first,
java.util.Vector second)
Return a new vector with no duplicated values
|
static java.util.Vector |
concatenateVectors(java.util.Vector first,
java.util.Vector second) |
static boolean |
containsNull(java.util.Vector v,
int index)
Returns whether the given
Vector contains a null element
Return true if the Vector contains a null element
Return false otherwise. |
static java.util.Vector |
copyVector(java.util.Vector originalVector,
int startIndex,
int stopIndex)
Return a copy of the vector containing a subset starting at startIndex
and ending at stopIndex.
|
static java.lang.String |
cr()
Return a string containing the platform-appropriate
characters for carriage return.
|
static java.lang.String |
currentWorkingDirectory()
Return the name of the "current working directory".
|
static java.sql.Date |
dateFromCalendar(java.util.Calendar calendar)
Answer a sql.Date from a Calendar.
|
static java.sql.Date |
dateFromLong(java.lang.Long longObject)
Answer a Date from a long
This implementation is based on the java.sql.Date class, not java.util.Date.
|
static java.sql.Date |
dateFromString(java.lang.String dateString)
Answer a Date from a string representation.
|
static java.sql.Date |
dateFromTimestamp(java.sql.Timestamp timestamp)
Answer a Date from a timestamp
This implementation is based on the java.sql.Date class, not java.util.Date.
|
static java.sql.Date |
dateFromYearMonthDate(int year,
int month,
int day)
Answer a Date with the year, month, date.
|
static boolean |
doesFileExist(java.lang.String fileName)
Returns true if the file of this name does indeed exist
|
static java.lang.String |
doubleSlashes(java.lang.String path)
Double up \ to allow printing of directories for source code generation.
|
static java.lang.String |
extractJarNameFromURL(java.net.URL url)
Extracts the actual path to the jar file.
|
static java.lang.String |
fileSeparator()
Return a string containing the platform-appropriate
characters for separating directory and file names.
|
static java.lang.reflect.Method |
getDeclaredMethod(java.lang.Class javaClass,
java.lang.String methodName,
java.lang.Class[] methodParameterTypes)
INTERNAL:
Returns a Method for the specified Class, method name,
and formal parameter types.
|
static java.util.TimeZone |
getDefaultTimeZone()
PERF: Return the cached default platform.
|
static java.lang.reflect.Field |
getField(java.lang.Class javaClass,
java.lang.String fieldName)
INTERNAL:
Returns a Field for the specified Class and field name.
|
static java.lang.Object |
getInstanceFromClass(java.lang.Class classFullName)
Return the class instance from the class
|
static java.lang.Object |
getNullWrapper()
Used to store null values in hashtables, is helper because need to be serializable.
|
static java.lang.Class |
getObjectClass(java.lang.Class javaClass)
Returns the object class.
|
static java.lang.String |
getPackageName(java.lang.Class javaClass)
return a package name for the specified class.
|
static java.lang.String |
getShortClassName(java.lang.Class javaClass)
Answers the unqualified class name for the provided class.
|
static java.lang.String |
getShortClassName(java.lang.Object object)
Answers the unqualified class name for the specified object.
|
static java.lang.String |
getShortClassName(java.lang.String javaClassName)
Answers the unqualified class name from the specified String.
|
static java.lang.String |
getTabs(int noOfTabs)
Return a string containing the specified number of tabs.
|
static int |
indexOfNullElement(java.util.Vector v,
int index)
Returns the index of the the first
null element found in the specified
Vector starting the search at the starting index specified. |
static boolean |
isCollection(java.lang.Object testObject)
Return true if the object implements the Collection interface
Creation date: (9/7/00 1:59:51 PM)
|
static boolean |
isPrimitiveWrapper(java.lang.Class classInQuestion)
ADVANCED
returns true if the class in question is a primitive wrapper
|
static boolean |
isUpperCaseString(java.lang.String s)
Returns true if the string given is an all upper case string
|
static boolean |
isVowel(char c)
Returns true if the character given is a vowel.
|
static java.io.File[] |
listFilesIn(java.io.File directory)
Return an array of the files in the specified directory.
|
static java.util.Vector |
makeVectorFromObject(java.lang.Object theObject)
Make a Vector from the passed object.
|
static java.lang.String |
pathSeparator()
Return a string containing the platform-appropriate
characters for separating entries in a path (e.g.
|
static java.lang.String |
printCalendar(java.util.Calendar calendar)
Print the Calendar.
|
static java.lang.String |
printCalendar(java.util.Calendar calendar,
boolean useLocalTime)
Print the Calendar.
|
static java.lang.String |
printCalendarWithoutNanos(java.util.Calendar calendar)
Print the Calendar without the nanos portion.
|
static java.lang.String |
printDate(java.util.Calendar calendar)
Print the date part of the calendar.
|
static java.lang.String |
printDate(java.util.Calendar calendar,
boolean useLocalTime)
Print the date part of the calendar.
|
static java.lang.String |
printDate(java.sql.Date date)
Print the sql.Date.
|
static java.lang.String |
printStackTraceToString(java.lang.Throwable aThrowable)
Return a String containing the printed stacktrace of an exception.
|
static java.lang.String |
printTime(java.util.Calendar calendar)
Print the time part of the calendar.
|
static java.lang.String |
printTime(java.util.Calendar calendar,
boolean useLocalTime)
Print the time part of the calendar.
|
static java.lang.String |
printTime(java.sql.Time time)
Print the sql.Time.
|
static java.lang.String |
printTimeFromMilliseconds(long milliseconds) |
static java.lang.String |
printTimestamp(java.sql.Timestamp timestamp)
Print the sql.Timestamp.
|
static java.lang.String |
printTimestampWithoutNanos(java.sql.Timestamp timestamp)
Print the sql.Timestamp without the nanos portion.
|
static java.lang.String |
printVector(java.util.Vector vector)
Given a Vector, print it, even if there is a null in it
|
static java.util.Hashtable |
rehashHashtable(java.util.Hashtable table) |
static java.util.Map |
rehashMap(java.util.Map table) |
static void |
releaseCalendar(java.util.Calendar calendar)
PERF: This is used to optimize Calendar conversion/printing.
|
static java.lang.String |
removeAllButAlphaNumericToFit(java.lang.String s1,
int maximumStringLength)
Returns a String which has had enough non-alphanumeric characters removed to be equal to
the maximumStringLength.
|
static java.lang.String |
removeCharacterToFit(java.lang.String s1,
char aChar,
int maximumStringLength)
Returns a String which has had enough of the specified character removed to be equal to
the maximumStringLength.
|
static boolean |
removeNullElement(java.util.Vector v)
Remove the first
null element found in the specified Vector . |
static java.lang.String |
removeVowels(java.lang.String s1)
Returns a String which has had enough of the specified character removed to be equal to
the maximumStringLength.
|
static java.lang.String |
replaceFirstSubString(java.lang.String source,
java.lang.String subString,
java.lang.String replacement)
Replaces the first subString of the source with the replacement.
|
static java.util.Vector |
reverseVector(java.util.Vector theVector) |
static java.lang.String |
rightTrimString(java.lang.String originalString)
Returns a new string with all space characters removed from the right
|
static void |
setShouldOptimizeDates(boolean value)
Return if JDBC date access should be optimized.
|
static java.lang.String |
shortenStringsByRemovingVowelsToFit(java.lang.String s1,
java.lang.String s2,
int maximumStringLength)
Returns a String which is a concatenation of two string which have had enough
vowels removed from them so that the sum of the sized of the two strings is less than
or equal to the specified size.
|
static boolean |
shouldOptimizeDates()
Return if JDBC date access should be optimized.
|
static java.sql.Date |
sqlDateFromUtilDate(java.util.Date utilDate)
Answer a sql.Date from a timestamp.
|
static void |
systemBug(java.lang.String description)
Can be used to mark code if a workaround is added for a JDBC driver or other bug.
|
static java.lang.String |
tempDirectory()
Return the name of the "temporary directory".
|
static java.sql.Time |
timeFromCalendar(java.util.Calendar calendar)
Answer a sql.Time from a Calendar.
|
static java.sql.Time |
timeFromDate(java.util.Date date)
Answer a Time from a Date
This implementation is based on the java.sql.Date class, not java.util.Date.
|
static java.sql.Time |
timeFromHourMinuteSecond(int hour,
int minute,
int second)
Answer a Time with the hour, minute, second.
|
static java.sql.Time |
timeFromLong(java.lang.Long longObject)
Answer a Time from a long
|
static java.sql.Time |
timeFromString(java.lang.String timeString)
Answer a Time from a string representation.
|
static java.sql.Time |
timeFromTimestamp(java.sql.Timestamp timestamp)
Answer a Time from a Timestamp
Usus the Hours, Minutes, Seconds instead of getTime() ms value.
|
static java.sql.Timestamp |
timestampFromCalendar(java.util.Calendar calendar)
Answer a Timestamp from a Calendar.
|
static java.sql.Timestamp |
timestampFromDate(java.util.Date date)
Answer a Timestamp from a java.util.Date.
|
static java.sql.Timestamp |
timestampFromLong(long millis)
Answer a Time from a long
|
static java.sql.Timestamp |
timestampFromLong(java.lang.Long millis)
Answer a Time from a long
|
static java.sql.Timestamp |
timestampFromString(java.lang.String timestampString)
Answer a Timestamp from a string representation.
|
static java.sql.Timestamp |
timestampFromYearMonthDateHourMinuteSecondNanos(int year,
int month,
int date,
int hour,
int minute,
int second,
int nanos)
Answer a Timestamp with the year, month, day, hour, minute, second.
|
static void |
toDo(java.lang.String description)
Can be used to mark code as need if something strange is seen.
|
static java.lang.String |
truncate(java.lang.String originalString,
int size)
If the size of the original string is larger than the passed in size,
this method will remove the vowels from the original string.
|
static java.util.Date |
utilDateFromLong(java.lang.Long longObject)
Answer a Date from a long
This implementation is based on the java.sql.Date class, not java.util.Date.
|
static java.util.Date |
utilDateFromSQLDate(java.sql.Date sqlDate)
Answer a java.util.Date from a sql.date
|
static java.util.Date |
utilDateFromTime(java.sql.Time time)
Answer a java.util.Date from a sql.Time
|
static java.util.Date |
utilDateFromTimestamp(java.sql.Timestamp timestampObject)
Answer a java.util.Date from a timestamp
|
static java.util.Vector |
vectorFromArray(java.lang.Object[] array)
Convert the specified array into a vector.
|
static void |
writeHexString(byte[] bytes,
java.io.Writer writer)
Convert the byte array to a HEX string.
|
protected static boolean shouldOptimizeDates
protected static java.lang.Object nullWrapper
protected static java.util.Vector calendarCache
protected static java.util.TimeZone defaultTimeZone
protected static java.lang.String CR
protected static java.lang.String PATH_SEPARATOR
protected static java.lang.String FILE_SEPARATOR
protected static java.lang.String CURRENT_WORKING_DIRECTORY
protected static java.lang.String TEMP_DIRECTORY
public static boolean shouldOptimizeDates()
public static void setShouldOptimizeDates(boolean value)
public static java.util.Calendar allocateCalendar()
public static java.util.TimeZone getDefaultTimeZone()
public static void releaseCalendar(java.util.Calendar calendar)
public static void addAllToVector(java.util.Vector theVector, java.util.Vector elementsToAdd)
public static void addAllToVector(java.util.Vector theVector, java.util.List elementsToAdd)
public static java.util.Vector addAllUniqueToVector(java.util.Vector theVector, java.util.Vector elementsToAdd)
public static java.lang.Object[] arrayFromVector(java.util.Vector vector)
public static byte[] buildBytesFromHexString(java.lang.String hex)
public static java.util.Hashtable buildHashtableFromVector(java.util.Vector theVector)
public static java.lang.String buildHexStringFromBytes(byte[] bytes)
public static java.util.Vector buildVectorFromHashtableElements(java.util.Hashtable hashtable)
public static java.util.Vector buildVectorFromMapElements(java.util.Map map)
public static java.util.Vector buildVectorFromHashtableElements(IdentityHashtable hashtable)
public static java.util.Calendar calendarFromUtilDate(java.util.Date date)
public static boolean classImplementsInterface(java.lang.Class aClass, java.lang.Class anInterface)
public static boolean classIsSubclass(java.lang.Class subClass, java.lang.Class superClass)
public static boolean compareArrays(java.lang.Object[] array1, java.lang.Object[] array2)
public static boolean compareBigDecimals(java.math.BigDecimal one, java.math.BigDecimal two)
BigDecimal.equals(Object)
public static boolean compareByteArrays(byte[] array1, byte[] array2)
public static boolean compareCharArrays(char[] array1, char[] array2)
public static boolean areTypesAssignable(java.util.Vector types1, java.util.Vector types2)
public static boolean compareHashtables(java.util.Hashtable hashtable1, java.util.Hashtable hashtable2)
public static boolean compareOrderedVectors(java.util.Vector vector1, java.util.Vector vector2)
Vector
s to see if they are equal.
The order of the elements is significant.public static boolean compareUnorderedVectors(java.util.Vector v1, java.util.Vector v2)
Vector
s to see if they are equal.
The order of the elements is ignored.v1
- a vectorv2
- a vectorpublic static java.util.Hashtable concatenateHashtables(java.util.Hashtable first, java.util.Hashtable second)
public static java.util.Map concatenateMaps(java.util.Map first, java.util.Map second)
public static java.util.Vector concatenateUniqueVectors(java.util.Vector first, java.util.Vector second)
public static java.util.Vector concatenateVectors(java.util.Vector first, java.util.Vector second)
public static boolean containsNull(java.util.Vector v, int index)
Vector
contains a null
element
Return true
if the Vector contains a null element
Return false
otherwise.
This is needed in jdk1.1, where Vector.contains(Object)
for a null
element will result in a NullPointerException
....public static java.util.Vector copyVector(java.util.Vector originalVector, int startIndex, int stopIndex) throws ValidationException
vector
- - original vectorstartIndex
- - starting position in vectorstopIndex
- - ending position in vectorTopLinkException
ValidationException
public static java.lang.String cr()
public static java.lang.String currentWorkingDirectory()
public static java.lang.String tempDirectory()
public static java.sql.Date dateFromLong(java.lang.Long longObject)
longObject
- - milliseconds from the epoch (00:00:00 GMT
Jan 1, 1970). Negative values represent dates prior to the epoch.public static java.sql.Date dateFromYearMonthDate(int year, int month, int day)
public static java.sql.Date dateFromString(java.lang.String dateString) throws ConversionException
dateString
- - string representation of dateConversionException
public static java.sql.Date dateFromTimestamp(java.sql.Timestamp timestamp)
timestampObject
- - timestamp representation of datepublic static boolean doesFileExist(java.lang.String fileName)
public static java.lang.String doubleSlashes(java.lang.String path)
public static java.lang.String extractJarNameFromURL(java.net.URL url)
public static java.lang.String fileSeparator()
public static java.lang.reflect.Field getField(java.lang.Class javaClass, java.lang.String fieldName) throws java.lang.NoSuchFieldException
java.lang.NoSuchFieldException
public static java.lang.reflect.Method getDeclaredMethod(java.lang.Class javaClass, java.lang.String methodName, java.lang.Class[] methodParameterTypes) throws java.lang.NoSuchMethodException
java.lang.NoSuchMethodException
public static java.lang.Object getInstanceFromClass(java.lang.Class classFullName)
public static java.lang.Object getNullWrapper()
public static java.lang.Class getObjectClass(java.lang.Class javaClass)
public static java.lang.String getShortClassName(java.lang.Class javaClass)
public static java.lang.String getShortClassName(java.lang.String javaClassName)
public static java.lang.String getShortClassName(java.lang.Object object)
public static java.lang.String getPackageName(java.lang.Class javaClass)
public static java.lang.String getTabs(int noOfTabs)
public static int indexOfNullElement(java.util.Vector v, int index)
null
element found in the specified
Vector
starting the search at the starting index specified.
Return an int >= 0 and less than size if a null
element was found.
Return -1 if a null
element was not found.
This is needed in jdk1.1, where Vector.contains(Object)
for a null
element will result in a NullPointerException
....public static boolean isCollection(java.lang.Object testObject)
testObject
- java.lang.Objectpublic static boolean isPrimitiveWrapper(java.lang.Class classInQuestion)
public static boolean isUpperCaseString(java.lang.String s)
public static boolean isVowel(char c)
public static java.io.File[] listFilesIn(java.io.File directory)
public static java.util.Vector makeVectorFromObject(java.lang.Object theObject)
public static java.lang.String pathSeparator()
public static java.lang.String printStackTraceToString(java.lang.Throwable aThrowable)
public static java.lang.String printTimeFromMilliseconds(long milliseconds)
public static java.lang.String printVector(java.util.Vector vector)
public static java.util.Hashtable rehashHashtable(java.util.Hashtable table)
public static java.util.Map rehashMap(java.util.Map table)
public static java.lang.String removeAllButAlphaNumericToFit(java.lang.String s1, int maximumStringLength)
public static java.lang.String removeCharacterToFit(java.lang.String s1, char aChar, int maximumStringLength)
public static boolean removeNullElement(java.util.Vector v)
null
element found in the specified Vector
.
Return true
if a null
element was found and removed.
Return false
if a null
element was not found.
This is needed in jdk1.1, where Vector.removeElement(Object)
for a null
element will result in a NullPointerException
....public static java.lang.String removeVowels(java.lang.String s1)
public static java.lang.String replaceFirstSubString(java.lang.String source, java.lang.String subString, java.lang.String replacement)
public static java.util.Vector reverseVector(java.util.Vector theVector)
public static java.lang.String rightTrimString(java.lang.String originalString)
originalString
- - timestamp representation of datepublic static java.lang.String shortenStringsByRemovingVowelsToFit(java.lang.String s1, java.lang.String s2, int maximumStringLength)
public static java.sql.Date sqlDateFromUtilDate(java.util.Date utilDate)
public static java.lang.String printDate(java.sql.Date date)
public static java.lang.String printDate(java.util.Calendar calendar)
public static java.lang.String printDate(java.util.Calendar calendar, boolean useLocalTime)
public static java.lang.String printTime(java.sql.Time time)
public static java.lang.String printTime(java.util.Calendar calendar)
public static java.lang.String printTime(java.util.Calendar calendar, boolean useLocalTime)
public static java.lang.String printCalendar(java.util.Calendar calendar)
public static java.lang.String printCalendar(java.util.Calendar calendar, boolean useLocalTime)
public static java.lang.String printTimestamp(java.sql.Timestamp timestamp)
public static java.lang.String buildZeroPrefix(int number, int totalDigits)
public static java.lang.String buildZeroPrefixAndTruncTrailZeros(int number, int totalDigits)
public static java.lang.String printTimestampWithoutNanos(java.sql.Timestamp timestamp)
public static java.lang.String printCalendarWithoutNanos(java.util.Calendar calendar)
public static java.sql.Date dateFromCalendar(java.util.Calendar calendar)
public static void systemBug(java.lang.String description)
public static java.sql.Time timeFromDate(java.util.Date date)
timestampObject
- - time representation of datepublic static java.sql.Time timeFromLong(java.lang.Long longObject)
longObject
- - milliseconds from the epoch (00:00:00 GMT
Jan 1, 1970). Negative values represent dates prior to the epoch.public static java.sql.Time timeFromHourMinuteSecond(int hour, int minute, int second)
public static java.sql.Time timeFromString(java.lang.String timeString) throws ConversionException
timeString
- - string representation of timeConversionException
public static java.sql.Time timeFromTimestamp(java.sql.Timestamp timestamp)
public static java.sql.Time timeFromCalendar(java.util.Calendar calendar)
public static java.sql.Timestamp timestampFromCalendar(java.util.Calendar calendar)
public static java.sql.Timestamp timestampFromDate(java.util.Date date)
public static java.sql.Timestamp timestampFromLong(java.lang.Long millis)
longObject
- - milliseconds from the epoch (00:00:00 GMT
Jan 1, 1970). Negative values represent dates prior to the epoch.public static java.sql.Timestamp timestampFromLong(long millis)
longObject
- - milliseconds from the epoch (00:00:00 GMT
Jan 1, 1970). Negative values represent dates prior to the epoch.public static java.sql.Timestamp timestampFromString(java.lang.String timestampString) throws ConversionException
timestampString
- - string representation of timestampConversionException
public static java.sql.Timestamp timestampFromYearMonthDateHourMinuteSecondNanos(int year, int month, int date, int hour, int minute, int second, int nanos)
public static void toDo(java.lang.String description)
public static java.lang.String truncate(java.lang.String originalString, int size)
public static java.util.Date utilDateFromLong(java.lang.Long longObject)
longObject
- - milliseconds from the epoch (00:00:00 GMT
Jan 1, 1970). Negative values represent dates prior to the epoch.public static java.util.Date utilDateFromSQLDate(java.sql.Date sqlDate)
sqlDate
- - sql.date representation of datepublic static java.util.Date utilDateFromTime(java.sql.Time time)
time
- - time representation of util datepublic static java.util.Date utilDateFromTimestamp(java.sql.Timestamp timestampObject)
timestampObject
- - timestamp representation of datepublic static java.util.Vector vectorFromArray(java.lang.Object[] array)
public static void writeHexString(byte[] bytes, java.io.Writer writer) throws java.io.IOException
java.io.IOException