public final static java.sql.Timestamp decodeTimestamp(byte[] byte_int){  if (byte_int.length != 8) throw new IllegalArgumentException("Bad parameter to decode");     byte[] date = new byte[4]; byte[] time = new byte[4];  System.arraycopy(byte_int, 0, date, 0, 4); System.arraycopy(byte_int, 4, time, 0, 4);  datetime d = new datetime(date,time); return d.toTimestamp(); }
public final static java.sql.Timestamp decodeTimestamp(java.sql.Timestamp value, Calendar cal){ if (cal == null) { return value; } else { long time = value.getTime() + cal.getTimeZone().getRawOffset(); return new java.sql.Timestamp(time); } }
    public final static java.sql.Timestamp decodeTimestamp(byte[] byte_int){                if (byte_int.length != 8)            throw new IllegalArgumentException("Bad parameter to decode");        // we have to extract time and date correctly        // see encodeTimestamp(...) for explanations        byte[] date = new byte[4];        byte[] time = new byte[4];                System.arraycopy(byte_int, 0, date, 0, 4);        System.arraycopy(byte_int, 4, time, 0, 4);        datetime d = new datetime(date,time);        return d.toTimestamp();    }