public static int getDay( long dt ) { TGregorianCalendar gregorianCalendar = getCalendar(); try { gregorianCalendar.setMillis(dt); return gregorianCalendar.get(Calendar.DAY_OF_MONTH); } finally { recycleCalendar(gregorianCalendar); } } public static int getDay( java.util.Date dt ) {
/** * Converts a byte array to a hexadecimal String equivalent. */ public static String toHexValue(byte[] barr) { FastStringBuffer sb = new FastStringBuffer(barr.length*2); for(int i=0; i<barr.length; i++) { int unsigned = barr[i] & 0xFF; sb.append(getUpperDigitAsHex(unsigned)); sb.append(getLowerDigitAsHex(unsigned)); } return sb.toString(); }
/** * Create a new exception. * The message is formatted using the StringUtil.format rules. * @param nextException the cause exception * @param msg the exception message * @ibm-api */ public AbstractException(Throwable nextException, String msg, Object...params) { super(StringUtil.format(msg,params)); initCause(nextException); }
/** * Create a new exception. * The message is formatted using the StringUtil.format rules. * @param nextException the cause exception * @param msg the exception message * @ibm-api */ public AbstractRuntimeException(Throwable nextException, String msg, Object...params) { super(StringUtil.format(msg,params)); initCause(nextException); }
public static int getHour( long dt ) { TGregorianCalendar gregorianCalendar = getCalendar(); try { gregorianCalendar.setMillis(dt); return gregorianCalendar.get(Calendar.HOUR_OF_DAY); } finally { recycleCalendar(gregorianCalendar); } } public static int getHour( java.util.Date dt ) {
/** * Converts a byte array to a hexadecimal String equivalent. */ public static String toHexValue(byte[] barr) { FastStringBuffer sb = new FastStringBuffer(barr.length*2); for(int i=0; i<barr.length; i++) { int unsigned = barr[i] & 0xFF; sb.append(getUpperDigitAsHex(unsigned)); sb.append(getLowerDigitAsHex(unsigned)); } return sb.toString(); }
/** * Create a new exception. * The message is formatted using the StringUtil.format rules. * @param nextException the cause exception * @param msg the exception message * @ibm-api */ public AbstractRuntimeException(Throwable nextException, String msg, Object...params) { super(StringUtil.format(msg,params)); initCause(nextException); }
public static int getMilliSecond( long dt ) { TGregorianCalendar gregorianCalendar = getCalendar(); try { gregorianCalendar.setMillis(dt); return gregorianCalendar.get(Calendar.MILLISECOND); } finally { recycleCalendar(gregorianCalendar); } } public static int getMilliSecond( java.util.Date dt ) {
public static int getYear( long dt ) { TGregorianCalendar gregorianCalendar = getCalendar(); try { gregorianCalendar.setMillis(dt); return gregorianCalendar.get(Calendar.YEAR); } finally { recycleCalendar(gregorianCalendar); } } public static int getYear( java.util.Date dt ) {
public static int getMonth( long dt ) { TGregorianCalendar gregorianCalendar = getCalendar(); try { gregorianCalendar.setMillis(dt); return gregorianCalendar.get(Calendar.MONTH)+1; } finally { recycleCalendar(gregorianCalendar); } } public static int getMonth( java.util.Date dt ) {
public static int getHour( long dt ) { TGregorianCalendar gregorianCalendar = getCalendar(); try { gregorianCalendar.setMillis(dt); return gregorianCalendar.get(Calendar.HOUR_OF_DAY); } finally { recycleCalendar(gregorianCalendar); } } public static int getHour( java.util.Date dt ) {
public static int getYear( long dt ) { TGregorianCalendar gregorianCalendar = getCalendar(); try { gregorianCalendar.setMillis(dt); return gregorianCalendar.get(Calendar.YEAR); } finally { recycleCalendar(gregorianCalendar); } } public static int getYear( java.util.Date dt ) {
public static int getMonth( long dt ) { TGregorianCalendar gregorianCalendar = getCalendar(); try { gregorianCalendar.setMillis(dt); return gregorianCalendar.get(Calendar.MONTH)+1; } finally { recycleCalendar(gregorianCalendar); } } public static int getMonth( java.util.Date dt ) {
public static int getMinute( long dt ) { TGregorianCalendar gregorianCalendar = getCalendar(); try { gregorianCalendar.setMillis(dt); return gregorianCalendar.get(Calendar.MINUTE); } finally { recycleCalendar(gregorianCalendar); } } public static int getMinute( java.util.Date dt ) {
public static int getSecond( long dt ) { TGregorianCalendar gregorianCalendar = getCalendar(); try { gregorianCalendar.setMillis(dt); return gregorianCalendar.get(Calendar.SECOND); } finally { recycleCalendar(gregorianCalendar); } } public static int getSecond( java.util.Date dt ) {
public static int getMilliSecond( long dt ) { TGregorianCalendar gregorianCalendar = getCalendar(); try { gregorianCalendar.setMillis(dt); return gregorianCalendar.get(Calendar.MILLISECOND); } finally { recycleCalendar(gregorianCalendar); } } public static int getMilliSecond( java.util.Date dt ) {
public static int getSecond( long dt ) { TGregorianCalendar gregorianCalendar = getCalendar(); try { gregorianCalendar.setMillis(dt); return gregorianCalendar.get(Calendar.SECOND); } finally { recycleCalendar(gregorianCalendar); } } public static int getSecond( java.util.Date dt ) {