// Decompiled by Jad v1.5.7f. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) braces deadcode fieldsfirst 
// Source File Name:   TIMESTAMPLTZ.java
// Class Version:      45.3

package oracle.sql;

import java.sql.Connection;
import java.sql.Date;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Time;
import java.sql.Timestamp;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.TimeZone;
import oracle.jdbc.OracleConnection;
import oracle.jdbc.OraclePreparedStatement;

// Referenced classes of package oracle.sql:
//            Datum, DATE, OffsetDST, TIMEZONETAB, 
//            ZONEIDMAP

// flag ACC_SUPER is set
public class TIMESTAMPLTZ extends Datum
{
    // Constants:          402
    // Interfaces:         0
    // Fields:             12
    // Methods:            49
    // Class Attributes:   1


    private static int SIZE_TIMESTAMPLTZ = 11;
    private static int SIZE_DATE = 7;
    private static int CENTURY_DEFAULT = 119;
    private static int DECADE_DEFAULT = 100;
    private static int MONTH_DEFAULT = 1;
    private static int DAY_DEFAULT = 1;
    private static int DECADE_INIT = 170;
    private static int HOUR_MILLISECOND = 0x36ee80;
    private static int MINUTE_MILLISECOND = 60000;
    private static int JAVA_YEAR = 1970;
    private static int JAVA_MONTH = 0;
    private static int JAVA_DATE = 1;

    // Decompiling method: <init>  Signature: ()V
    // Max stack: 2, #locals: 1, #params: 1
    // Code length: 8 bytes, Code offset: 6150
    // Line Number Table found: 2 entries
    // Parameter  0 added: Name this Type Loracle/sql/TIMESTAMPLTZ; At 0 8 Range 0 7 Init 0 fixed
    // RetValue   1 added: Name <returnValue> Type V At 0 8 Range 0 7 Init 0 fixed
    public TIMESTAMPLTZ()
    {
        super(initTimestampltz());
        return;
    }

    // Decompiling method: <init>  Signature: (Ljava/sql/Connection;Ljava/lang/String;)V
    // Max stack: 4, #locals: 3, #params: 3
    // Code length: 17 bytes, Code offset: 6200
    // Line Number Table found: 2 entries
    // Parameter  0 added: Name this Type Loracle/sql/TIMESTAMPLTZ; At 0 17 Range 0 16 Init 0 fixed
    // Parameter  1 added: Name connection Type Ljava/sql/Connection; At 0 17 Range 0 16 Init 0
    // Parameter  2 added: Name s Type Ljava/lang/String; At 0 17 Range 0 16 Init 0
    // RetValue   3 added: Name <returnValue> Type V At 0 17 Range 0 16 Init 0 fixed
    public TIMESTAMPLTZ(Connection connection, String s)
        throws SQLException
    {
        super(toBytes(connection, getSessCalendar(connection), Timestamp.valueOf(s)));
        return;
    }

    // Decompiling method: <init>  Signature: (Ljava/sql/Connection;Ljava/lang/String;Ljava/util/Calendar;)V
    // Max stack: 4, #locals: 4, #params: 4
    // Code length: 11 bytes, Code offset: 6275
    // Line Number Table found: 2 entries
    // Parameter  0 added: Name this Type Loracle/sql/TIMESTAMPLTZ; At 0 11 Range 0 10 Init 0 fixed
    // Parameter  1 added: Name connection Type Ljava/sql/Connection; At 0 11 Range 0 10 Init 0
    // Parameter  2 added: Name s Type Ljava/lang/String; At 0 11 Range 0 10 Init 0
    // Parameter  3 added: Name calendar Type Ljava/util/Calendar; At 0 11 Range 0 10 Init 0
    // RetValue   4 added: Name <returnValue> Type V At 0 11 Range 0 10 Init 0 fixed
    public TIMESTAMPLTZ(Connection connection, String s, Calendar calendar)
        throws SQLException
    {
        super(toBytes(connection, s, calendar));
        return;
    }

    // Decompiling method: <init>  Signature: (Ljava/sql/Connection;Ljava/sql/Date;)V
    // Max stack: 4, #locals: 3, #params: 3
    // Code length: 14 bytes, Code offset: 6344
    // Line Number Table found: 2 entries
    // Parameter  0 added: Name this Type Loracle/sql/TIMESTAMPLTZ; At 0 14 Range 0 13 Init 0 fixed
    // Parameter  1 added: Name connection Type Ljava/sql/Connection; At 0 14 Range 0 13 Init 0
    // Parameter  2 added: Name date Type Ljava/sql/Date; At 0 14 Range 0 13 Init 0
    // RetValue   3 added: Name <returnValue> Type V At 0 14 Range 0 13 Init 0 fixed
    public TIMESTAMPLTZ(Connection connection, Date date)
        throws SQLException
    {
        super(toBytes(connection, getSessCalendar(connection), date));
        return;
    }

    // Decompiling method: <init>  Signature: (Ljava/sql/Connection;Ljava/sql/Date;Ljava/util/Calendar;)V
    // Max stack: 4, #locals: 4, #params: 4
    // Code length: 11 bytes, Code offset: 6410
    // Line Number Table found: 2 entries
    // Parameter  0 added: Name this Type Loracle/sql/TIMESTAMPLTZ; At 0 11 Range 0 10 Init 0 fixed
    // Parameter  1 added: Name connection Type Ljava/sql/Connection; At 0 11 Range 0 10 Init 0
    // Parameter  2 added: Name date Type Ljava/sql/Date; At 0 11 Range 0 10 Init 0
    // Parameter  3 added: Name calendar Type Ljava/util/Calendar; At 0 11 Range 0 10 Init 0
    // RetValue   4 added: Name <returnValue> Type V At 0 11 Range 0 10 Init 0 fixed
    public TIMESTAMPLTZ(Connection connection, Date date, Calendar calendar)
        throws SQLException
    {
        super(toBytes(connection, date, calendar));
        return;
    }

    // Decompiling method: <init>  Signature: (Ljava/sql/Connection;Ljava/sql/Time;)V
    // Max stack: 4, #locals: 3, #params: 3
    // Code length: 14 bytes, Code offset: 6479
    // Line Number Table found: 2 entries
    // Parameter  0 added: Name this Type Loracle/sql/TIMESTAMPLTZ; At 0 14 Range 0 13 Init 0 fixed
    // Parameter  1 added: Name connection Type Ljava/sql/Connection; At 0 14 Range 0 13 Init 0
    // Parameter  2 added: Name time Type Ljava/sql/Time; At 0 14 Range 0 13 Init 0
    // RetValue   3 added: Name <returnValue> Type V At 0 14 Range 0 13 Init 0 fixed
    public TIMESTAMPLTZ(Connection connection, Time time)
        throws SQLException
    {
        super(toBytes(connection, getSessCalendar(connection), time));
        return;
    }

    // Decompiling method: <init>  Signature: (Ljava/sql/Connection;Ljava/sql/Time;Ljava/util/Calendar;)V
    // Max stack: 4, #locals: 4, #params: 4
    // Code length: 11 bytes, Code offset: 6545
    // Line Number Table found: 2 entries
    // Parameter  0 added: Name this Type Loracle/sql/TIMESTAMPLTZ; At 0 11 Range 0 10 Init 0 fixed
    // Parameter  1 added: Name connection Type Ljava/sql/Connection; At 0 11 Range 0 10 Init 0
    // Parameter  2 added: Name time Type Ljava/sql/Time; At 0 11 Range 0 10 Init 0
    // Parameter  3 added: Name calendar Type Ljava/util/Calendar; At 0 11 Range 0 10 Init 0
    // RetValue   4 added: Name <returnValue> Type V At 0 11 Range 0 10 Init 0 fixed
    public TIMESTAMPLTZ(Connection connection, Time time, Calendar calendar)
        throws SQLException
    {
        super(toBytes(connection, time, calendar));
        return;
    }

    // Decompiling method: <init>  Signature: (Ljava/sql/Connection;Ljava/sql/Timestamp;)V
    // Max stack: 4, #locals: 3, #params: 3
    // Code length: 14 bytes, Code offset: 6614
    // Line Number Table found: 2 entries
    // Parameter  0 added: Name this Type Loracle/sql/TIMESTAMPLTZ; At 0 14 Range 0 13 Init 0 fixed
    // Parameter  1 added: Name connection Type Ljava/sql/Connection; At 0 14 Range 0 13 Init 0
    // Parameter  2 added: Name timestamp Type Ljava/sql/Timestamp; At 0 14 Range 0 13 Init 0
    // RetValue   3 added: Name <returnValue> Type V At 0 14 Range 0 13 Init 0 fixed
    public TIMESTAMPLTZ(Connection connection, Timestamp timestamp)
        throws SQLException
    {
        super(toBytes(connection, getSessCalendar(connection), timestamp));
        return;
    }

    // Decompiling method: <init>  Signature: (Ljava/sql/Connection;Ljava/sql/Timestamp;Ljava/util/Calendar;)V
    // Max stack: 4, #locals: 4, #params: 4
    // Code length: 11 bytes, Code offset: 6680
    // Line Number Table found: 2 entries
    // Parameter  0 added: Name this Type Loracle/sql/TIMESTAMPLTZ; At 0 11 Range 0 10 Init 0 fixed
    // Parameter  1 added: Name connection Type Ljava/sql/Connection; At 0 11 Range 0 10 Init 0
    // Parameter  2 added: Name timestamp Type Ljava/sql/Timestamp; At 0 11 Range 0 10 Init 0
    // Parameter  3 added: Name calendar Type Ljava/util/Calendar; At 0 11 Range 0 10 Init 0
    // RetValue   4 added: Name <returnValue> Type V At 0 11 Range 0 10 Init 0 fixed
    public TIMESTAMPLTZ(Connection connection, Timestamp timestamp, Calendar calendar)
        throws SQLException
    {
        super(toBytes(connection, timestamp, calendar));
        return;
    }

    // Decompiling method: <init>  Signature: (Ljava/sql/Connection;Ljava/util/Calendar;Ljava/lang/String;)V
    // Max stack: 4, #locals: 4, #params: 4
    // Code length: 14 bytes, Code offset: 6749
    // Line Number Table found: 2 entries
    // Parameter  0 added: Name this Type Loracle/sql/TIMESTAMPLTZ; At 0 14 Range 0 13 Init 0 fixed
    // Parameter  1 added: Name connection Type Ljava/sql/Connection; At 0 14 Range 0 13 Init 0
    // Parameter  2 added: Name calendar Type Ljava/util/Calendar; At 0 14 Range 0 13 Init 0
    // Parameter  3 added: Name s Type Ljava/lang/String; At 0 14 Range 0 13 Init 0
    // RetValue   4 added: Name <returnValue> Type V At 0 14 Range 0 13 Init 0 fixed
    public TIMESTAMPLTZ(Connection connection, Calendar calendar, String s)
        throws SQLException
    {
        super(toBytes(connection, getSessCalendar(connection), s));
        return;
    }

    // Decompiling method: <init>  Signature: (Ljava/sql/Connection;Ljava/util/Calendar;Ljava/sql/Date;)V
    // Max stack: 4, #locals: 4, #params: 4
    // Code length: 11 bytes, Code offset: 6821
    // Line Number Table found: 2 entries
    // Parameter  0 added: Name this Type Loracle/sql/TIMESTAMPLTZ; At 0 11 Range 0 10 Init 0 fixed
    // Parameter  1 added: Name connection Type Ljava/sql/Connection; At 0 11 Range 0 10 Init 0
    // Parameter  2 added: Name calendar Type Ljava/util/Calendar; At 0 11 Range 0 10 Init 0
    // Parameter  3 added: Name date Type Ljava/sql/Date; At 0 11 Range 0 10 Init 0
    // RetValue   4 added: Name <returnValue> Type V At 0 11 Range 0 10 Init 0 fixed
    public TIMESTAMPLTZ(Connection connection, Calendar calendar, Date date)
        throws SQLException
    {
        super(toBytes(connection, calendar, date));
        return;
    }

    // Decompiling method: <init>  Signature: (Ljava/sql/Connection;Ljava/util/Calendar;Ljava/sql/Time;)V
    // Max stack: 4, #locals: 4, #params: 4
    // Code length: 11 bytes, Code offset: 6884
    // Line Number Table found: 2 entries
    // Parameter  0 added: Name this Type Loracle/sql/TIMESTAMPLTZ; At 0 11 Range 0 10 Init 0 fixed
    // Parameter  1 added: Name connection Type Ljava/sql/Connection; At 0 11 Range 0 10 Init 0
    // Parameter  2 added: Name calendar Type Ljava/util/Calendar; At 0 11 Range 0 10 Init 0
    // Parameter  3 added: Name time Type Ljava/sql/Time; At 0 11 Range 0 10 Init 0
    // RetValue   4 added: Name <returnValue> Type V At 0 11 Range 0 10 Init 0 fixed
    public TIMESTAMPLTZ(Connection connection, Calendar calendar, Time time)
        throws SQLException
    {
        super(toBytes(connection, calendar, time));
        return;
    }

    // Decompiling method: <init>  Signature: (Ljava/sql/Connection;Ljava/util/Calendar;Ljava/sql/Timestamp;)V
    // Max stack: 4, #locals: 4, #params: 4
    // Code length: 11 bytes, Code offset: 6947
    // Line Number Table found: 2 entries
    // Parameter  0 added: Name this Type Loracle/sql/TIMESTAMPLTZ; At 0 11 Range 0 10 Init 0 fixed
    // Parameter  1 added: Name connection Type Ljava/sql/Connection; At 0 11 Range 0 10 Init 0
    // Parameter  2 added: Name calendar Type Ljava/util/Calendar; At 0 11 Range 0 10 Init 0
    // Parameter  3 added: Name timestamp Type Ljava/sql/Timestamp; At 0 11 Range 0 10 Init 0
    // RetValue   4 added: Name <returnValue> Type V At 0 11 Range 0 10 Init 0 fixed
    public TIMESTAMPLTZ(Connection connection, Calendar calendar, Timestamp timestamp)
        throws SQLException
    {
        super(toBytes(connection, calendar, timestamp));
        return;
    }

    // Decompiling method: <init>  Signature: (Ljava/sql/Connection;Ljava/util/Calendar;Loracle/sql/DATE;)V
    // Max stack: 4, #locals: 4, #params: 4
    // Code length: 11 bytes, Code offset: 7010
    // Line Number Table found: 2 entries
    // Parameter  0 added: Name this Type Loracle/sql/TIMESTAMPLTZ; At 0 11 Range 0 10 Init 0 fixed
    // Parameter  1 added: Name connection Type Ljava/sql/Connection; At 0 11 Range 0 10 Init 0
    // Parameter  2 added: Name calendar Type Ljava/util/Calendar; At 0 11 Range 0 10 Init 0
    // Parameter  3 added: Name date Type Loracle/sql/DATE; At 0 11 Range 0 10 Init 0
    // RetValue   4 added: Name <returnValue> Type V At 0 11 Range 0 10 Init 0 fixed
    public TIMESTAMPLTZ(Connection connection, Calendar calendar, DATE date)
        throws SQLException
    {
        super(toBytes(connection, calendar, date));
        return;
    }

    // Decompiling method: <init>  Signature: (Ljava/sql/Connection;Loracle/sql/DATE;)V
    // Max stack: 4, #locals: 3, #params: 3
    // Code length: 14 bytes, Code offset: 7073
    // Line Number Table found: 2 entries
    // Parameter  0 added: Name this Type Loracle/sql/TIMESTAMPLTZ; At 0 14 Range 0 13 Init 0 fixed
    // Parameter  1 added: Name connection Type Ljava/sql/Connection; At 0 14 Range 0 13 Init 0
    // Parameter  2 added: Name date Type Loracle/sql/DATE; At 0 14 Range 0 13 Init 0
    // RetValue   3 added: Name <returnValue> Type V At 0 14 Range 0 13 Init 0 fixed
    public TIMESTAMPLTZ(Connection connection, DATE date)
        throws SQLException
    {
        super(toBytes(connection, getSessCalendar(connection), date));
        return;
    }

    // Decompiling method: <init>  Signature: (Ljava/sql/Connection;Loracle/sql/DATE;Ljava/util/Calendar;)V
    // Max stack: 4, #locals: 4, #params: 4
    // Code length: 11 bytes, Code offset: 7139
    // Line Number Table found: 2 entries
    // Parameter  0 added: Name this Type Loracle/sql/TIMESTAMPLTZ; At 0 11 Range 0 10 Init 0 fixed
    // Parameter  1 added: Name connection Type Ljava/sql/Connection; At 0 11 Range 0 10 Init 0
    // Parameter  2 added: Name date Type Loracle/sql/DATE; At 0 11 Range 0 10 Init 0
    // Parameter  3 added: Name calendar Type Ljava/util/Calendar; At 0 11 Range 0 10 Init 0
    // RetValue   4 added: Name <returnValue> Type V At 0 11 Range 0 10 Init 0 fixed
    public TIMESTAMPLTZ(Connection connection, DATE date, Calendar calendar)
        throws SQLException
    {
        super(toBytes(connection, date, calendar));
        return;
    }

    // Decompiling method: <init>  Signature: ([B)V
    // Max stack: 2, #locals: 2, #params: 2
    // Code length: 6 bytes, Code offset: 7208
    // Line Number Table found: 2 entries
    // Parameter  0 added: Name this Type Loracle/sql/TIMESTAMPLTZ; At 0 6 Range 0 5 Init 0 fixed
    // Parameter  1 added: Name abyte0 Type [B At 0 6 Range 0 5 Init 0
    // RetValue   2 added: Name <returnValue> Type V At 0 6 Range 0 5 Init 0 fixed
    public TIMESTAMPLTZ(byte abyte0[])
    {
        super(abyte0);
        return;
    }

    // Decompiling method: TimeZoneAdjust  Signature: (Ljava/sql/Connection;Ljava/util/Calendar;Ljava/util/Calendar;)V
    // Max stack: 4, #locals: 13, #params: 3
    // Code length: 434 bytes, Code offset: 7256
    // Line Number Table found: 47 entries
    // Parameter  0 added: Name connection Type Ljava/sql/Connection; At 0 434 Range 0 433 Init 0
    // Parameter  1 added: Name calendar Type Ljava/util/Calendar; At 0 434 Range 0 433 Init 0
    // Parameter  2 added: Name calendar1 Type Ljava/util/Calendar; At 0 434 Range 0 433 Init 0
    // RetValue  13 added: Name <returnValue> Type V At 0 434 Range 0 433 Init 0 fixed
    // LocalVar   4 added: Name s Type Ljava/lang/String; At 14 208 Range 14 221 Init 14
    // LocalVar   5 added: Name s1 Type Ljava/lang/String; At 30 182 Range 30 211 Init 30
    // LocalVar   6 added: Name offsetdst Type Loracle/sql/OffsetDST; At 69 13 Range 69 81 Init 69
    // LocalVar   7 added: Name byte0 Type B At 78 2 Range 78 79 Init 78
    // LocalVar   8 added: Name i Type I At 85 20 Range 85 104 Init 85
    // LocalVar   3 added: Name j Type I At 134 65 Range 134 198 Init 134
    // LocalVar   9 added: Name k Type I At 143 37 Range 143 179 Init 143
    // LocalVar   6 added: Name l Type I At 237 45 Range 237 281 Init 237
    // LocalVar   7 added: Name i1 Type I At 246 38 Range 246 283 Init 246
    // LocalVar   8 added: Name flag Type Z At 249 60 Range 249 308 Init 249
    // LocalVar   8 chged: Name j1 Oname flag Type I At 263 14 Range 249 308 Init 249
    // LocalVar   6 added: Name k1 Type I At 325 59 Range 325 383 Init 325
    // LocalVar   7 added: Name l1 Type I At 332 59 Range 332 390 Init 332
    // LocalVar   8 added: Name i2 Type I At 339 59 Range 339 397 Init 339
    // LocalVar   9 added: Name j2 Type I At 347 59 Range 347 405 Init 347
    // LocalVar  10 added: Name k2 Type I At 355 59 Range 355 413 Init 355
    // LocalVar  11 added: Name l2 Type I At 363 59 Range 363 421 Init 363
    // LocalVar  12 added: Name i3 Type I At 371 59 Range 371 429 Init 371
    private static void TimeZoneAdjust(Connection connection, Calendar calendar, Calendar calendar1)
        throws SQLException
    {
        String s = new String(calendar.getTimeZone().getID());
        String s1 = new String(calendar1.getTimeZone().getID());
        if(!s1.equals(s) && (!s1.equals("Custom") || !s.equals("Custom")))
        {
            OffsetDST offsetdst = new OffsetDST();
            byte byte0 = getZoneOffset(connection, calendar, offsetdst);
            int j1 = offsetdst.getOFFSET();
            calendar.add(11, -(j1 / HOUR_MILLISECOND));
            calendar.add(12, -(j1 % HOUR_MILLISECOND) / MINUTE_MILLISECOND);
            int i;
            if(s1.equals("Custom"))
            {
                i = calendar1.getTimeZone().getRawOffset();
            } else
            {
                int i2 = ZONEIDMAP.getID(s1);
                if(i2 == ZONEIDMAP.INV_ZONEID)
                {
                    throw new SQLException("Timezone not supported");
                }
                if(TIMEZONETAB.checkID(i2))
                {
                    TIMEZONETAB.updateTable(connection, i2);
                }
                i = TIMEZONETAB.getOffset(calendar, i2);
            }
            calendar.add(11, i / HOUR_MILLISECOND);
            calendar.add(12, (i % HOUR_MILLISECOND) / MINUTE_MILLISECOND);
        }
        if(s1.equals("Custom") && s.equals("Custom"))
        {
            int j = calendar.getTimeZone().getRawOffset();
            int l = calendar1.getTimeZone().getRawOffset();
            int k1 = 0;
            if(j != l)
            {
                k1 = j - l;
                k1 = k1 <= 0 ? -k1 : k1;
            }
            if(j > l)
            {
                k1 = -k1;
            }
            calendar.add(11, k1 / HOUR_MILLISECOND);
            calendar.add(12, (k1 % HOUR_MILLISECOND) / MINUTE_MILLISECOND);
        }
        int k = calendar.get(1);
        int i1 = calendar.get(2);
        int l1 = calendar.get(5);
        int j2 = calendar.get(11);
        int k2 = calendar.get(12);
        int l2 = calendar.get(13);
        int i3 = calendar.get(14);
        TimeZone.setDefault(calendar1.getTimeZone());
        calendar1.set(1, k);
        calendar1.set(2, i1);
        calendar1.set(5, l1);
        calendar1.set(11, j2);
        calendar1.set(12, k2);
        calendar1.set(13, l2);
        calendar1.set(14, i3);
        return;
    }

    // Decompiling method: getDbTzCalendar  Signature: (Ljava/lang/String;)Ljava/util/Calendar;
    // Max stack: 5, #locals: 8, #params: 1
    // Code length: 141 bytes, Code offset: 7922
    // Line Number Table found: 21 entries
    // Parameter  0 added: Name s Type Ljava/lang/String; At 0 141 Range 0 140 Init 0
    // RetValue   8 added: Name <returnValue> Type Ljava/util/Calendar; At 0 141 Range 0 140 Init 0 fixed
    // LocalVar   1 added: Name flag Type Z At 1 1 Range 1 1 Init 1
    // LocalVar   2 added: Name stringbuffer Type Ljava/lang/StringBuffer; At 9 77 Range 9 85 Init 9
    // LocalVar   3 added: Name c Type C At 15 29 Range 15 43 Init 15
    // LocalVar   1 added: Name flag1 Type Z At 23 83 Range 23 105 Init 23
    // LocalVar   4 added: Name time Type Ljava/sql/Time; At 92 4 Range 92 95 Init 92
    // LocalVar   5 added: Name l Type J At 103 24 Range 103 126 Init 103
    // LocalVar   7 added: Name timezone Type Ljava/util/TimeZone; At 121 16 Range 121 136 Init 121
    // LocalVar   1 name flag1(Z) merged out into flag(Z)
    private static Calendar getDbTzCalendar(String s)
    {
        boolean flag = true;
        StringBuffer stringbuffer = new StringBuffer();
        char c = s.charAt(0);
        if(c == '+')
        {
            flag = true;
            stringbuffer.append(s.toCharArray(), 1, s.length() - 1);
        } else
        if(c == '-')
        {
            flag = false;
            stringbuffer.append(s.toCharArray(), 1, s.length() - 1);
        } else
        {
            flag = true;
            stringbuffer.append(s);
        }
        stringbuffer.append(":00");
        Time time = Time.valueOf(stringbuffer.toString());
        long l = time.getTime() - 0x001499700L;
        if(!flag)
        {
            l *= -1L;
        }
        TimeZone timezone = TimeZone.getDefault();
        timezone.setRawOffset((int)l);
        return new GregorianCalendar(timezone);
    }

    // Decompiling method: getJavaYear  Signature: (II)I
    // Max stack: 3, #locals: 2, #params: 2
    // Code length: 13 bytes, Code offset: 8181
    // Line Number Table found: 1 entries
    // Parameter  0 added: Name i Type I At 0 13 Range 0 12 Init 0
    // Parameter  1 added: Name j Type I At 0 13 Range 0 12 Init 0
    // RetValue   2 added: Name <returnValue> Type I At 0 13 Range 0 12 Init 0 fixed
    private static int getJavaYear(int i, int j)
    {
        return (i - 100) * 100 + (j - 100);
    }

    // Decompiling method: getSessCalendar  Signature: (Ljava/sql/Connection;)Ljava/util/Calendar;
    // Max stack: 2, #locals: 4, #params: 1
    // Code length: 37 bytes, Code offset: 8232
    // Line Number Table found: 8 entries
    // Parameter  0 added: Name connection Type Ljava/sql/Connection; At 0 37 Range 0 36 Init 0
    // RetValue   4 added: Name <returnValue> Type Ljava/util/Calendar; At 0 37 Range 0 36 Init 0 fixed
    // LocalVar   1 added: Name s Type Ljava/lang/String; At 9 18 Range 9 26 Init 9
    // LocalVar   2 added: Name calendar Type Ljava/util/Calendar; At 17 19 Range 17 35 Init 17
    // LocalVar   3 added: Name timezone Type Ljava/util/TimeZone; At 24 7 Range 24 30 Init 24
    private static Calendar getSessCalendar(Connection connection)
    {
        String s = ((OracleConnection)connection).getSessionTimeZone();
        Calendar calendar;
        if(s == null)
        {
            calendar = Calendar.getInstance();
        } else
        {
            TimeZone timezone = TimeZone.getDefault();
            timezone.setID(s);
            calendar = Calendar.getInstance(timezone);
        }
        return calendar;
    }

    // Decompiling method: getZoneOffset  Signature: (Ljava/sql/Connection;Ljava/util/Calendar;Loracle/sql/OffsetDST;)B
    // Max stack: 3, #locals: 6, #params: 3
    // Code length: 93 bytes, Code offset: 8335
    // Line Number Table found: 12 entries
    // Parameter  0 added: Name connection Type Ljava/sql/Connection; At 0 93 Range 0 92 Init 0
    // Parameter  1 added: Name calendar Type Ljava/util/Calendar; At 0 93 Range 0 92 Init 0
    // Parameter  2 added: Name offsetdst Type Loracle/sql/OffsetDST; At 0 93 Range 0 92 Init 0
    // RetValue   6 added: Name <returnValue> Type B At 0 93 Range 0 92 Init 0 fixed
    // LocalVar   3 added: Name flag Type Z At 1 91 Range 1 91 Init 1
    // LocalVar   4 added: Name s Type Ljava/lang/String; At 42 4 Range 42 45 Init 42
    // LocalVar   5 added: Name i Type I At 49 37 Range 49 85 Init 49
    // LocalVar   3 chged: Name byte0 Oname flag Type B At 90 2 Range 1 91 Init 1
    private static byte getZoneOffset(Connection connection, Calendar calendar, OffsetDST offsetdst)
        throws SQLException
    {
        byte byte0 = 0;
        if(calendar.getTimeZone().getID() == "Custom")
        {
            offsetdst.setOFFSET(calendar.getTimeZone().getRawOffset());
        } else
        {
            String s = new String(calendar.getTimeZone().getID());
            int i = ZONEIDMAP.getID(s);
            if(i == ZONEIDMAP.INV_ZONEID)
            {
                throw new SQLException("Timezone not supported");
            }
            if(TIMEZONETAB.checkID(i))
            {
                TIMEZONETAB.updateTable(connection, i);
            }
            byte0 = TIMEZONETAB.getLocalOffset(calendar, i, offsetdst);
        }
        return byte0;
    }

    // Decompiling method: initTimestampltz  Signature: ()[B
    // Max stack: 3, #locals: 1, #params: 0
    // Code length: 69 bytes, Code offset: 8520
    // Line Number Table found: 13 entries
    // RetValue   1 added: Name <returnValue> Type [B At 0 69 Range 0 68 Init 0 fixed
    // LocalVar   0 added: Name abyte0 Type [B At 5 63 Range 5 67 Init 5
    private static byte[] initTimestampltz()
    {
        byte abyte0[] = new byte[SIZE_TIMESTAMPLTZ];
        abyte0[0] = (byte)CENTURY_DEFAULT;
        abyte0[1] = (byte)DECADE_INIT;
        abyte0[2] = (byte)MONTH_DEFAULT;
        abyte0[3] = (byte)DAY_DEFAULT;
        abyte0[4] = 1;
        abyte0[5] = 1;
        abyte0[6] = 1;
        abyte0[7] = 0;
        abyte0[8] = 0;
        abyte0[9] = 0;
        abyte0[10] = 0;
        return abyte0;
    }

    // Decompiling method: isConvertibleTo  Signature: (Ljava/lang/Class;)Z
    // Max stack: 2, #locals: 2, #params: 2
    // Code length: 52 bytes, Code offset: 8675
    // Line Number Table found: 6 entries
    // Parameter  0 added: Name this Type Loracle/sql/TIMESTAMPLTZ; At 0 52 Range 0 51 Init 0 fixed
    // Parameter  1 added: Name class1 Type Ljava/lang/Class; At 0 52 Range 0 51 Init 0
    // RetValue   2 added: Name <returnValue> Type Z At 0 52 Range 0 51 Init 0 fixed
    public boolean isConvertibleTo(Class class1)
    {
        return class1.getName().compareTo("java.sql.Date") == 0 || class1.getName().compareTo("java.sql.Time") == 0 || class1.getName().compareTo("java.sql.Timestamp") == 0 || class1.getName().compareTo("java.lang.String") == 0;
    }

    // Decompiling method: makeJdbcArray  Signature: (I)Ljava/lang/Object;
    // Max stack: 1, #locals: 3, #params: 2
    // Code length: 7 bytes, Code offset: 8785
    // Line Number Table found: 2 entries
    // Parameter  0 added: Name this Type Loracle/sql/TIMESTAMPLTZ; At 0 7 Range 0 6 Init 0 fixed
    // Parameter  1 added: Name i Type I At 0 7 Range 0 6 Init 0
    // RetValue   3 added: Name <returnValue> Type Ljava/lang/Object; At 0 7 Range 0 6 Init 0 fixed
    // LocalVar   2 added: Name atimestamp Type [Ljava/sql/Timestamp; At 4 2 Range 4 5 Init 4
    public Object makeJdbcArray(int i)
    {
        Timestamp atimestamp[] = new Timestamp[i];
        return atimestamp;
    }

    // Decompiling method: timestampValue  Signature: (Ljava/sql/Connection;Ljava/util/Calendar;)Ljava/sql/Timestamp;
    // Max stack: 3, #locals: 3, #params: 3
    // Code length: 10 bytes, Code offset: 8834
    // Line Number Table found: 1 entries
    // Parameter  0 added: Name this Type Loracle/sql/TIMESTAMPLTZ; At 0 10 Range 0 9 Init 0 fixed
    // Parameter  1 added: Name connection Type Ljava/sql/Connection; At 0 10 Range 0 9 Init 0
    // Parameter  2 added: Name calendar Type Ljava/util/Calendar; At 0 10 Range 0 9 Init 0
    // RetValue   3 added: Name <returnValue> Type Ljava/sql/Timestamp; At 0 10 Range 0 9 Init 0 fixed
    public Timestamp timestampValue(Connection connection, Calendar calendar)
        throws SQLException
    {
        return toTimestamp(connection, getBytes(), calendar);
    }

    // Decompiling method: toBytes  Signature: ()[B
    // Max stack: 1, #locals: 1, #params: 1
    // Code length: 5 bytes, Code offset: 8892
    // Line Number Table found: 1 entries
    // Parameter  0 added: Name this Type Loracle/sql/TIMESTAMPLTZ; At 0 5 Range 0 4 Init 0 fixed
    // RetValue   1 added: Name <returnValue> Type [B At 0 5 Range 0 4 Init 0 fixed
    public byte[] toBytes()
    {
        return getBytes();
    }

    // Decompiling method: toBytes  Signature: (Ljava/sql/Connection;Ljava/lang/String;Ljava/util/Calendar;)[B
    // Max stack: 3, #locals: 3, #params: 3
    // Code length: 10 bytes, Code offset: 8935
    // Line Number Table found: 1 entries
    // Parameter  0 added: Name connection Type Ljava/sql/Connection; At 0 10 Range 0 9 Init 0
    // Parameter  1 added: Name s Type Ljava/lang/String; At 0 10 Range 0 9 Init 0
    // Parameter  2 added: Name calendar Type Ljava/util/Calendar; At 0 10 Range 0 9 Init 0
    // RetValue   3 added: Name <returnValue> Type [B At 0 10 Range 0 9 Init 0 fixed
    public static byte[] toBytes(Connection connection, String s, Calendar calendar)
        throws SQLException
    {
        return toBytes(connection, Timestamp.valueOf(s), calendar);
    }

    // Decompiling method: toBytes  Signature: (Ljava/sql/Connection;Ljava/sql/Date;Ljava/util/Calendar;)[B
    // Max stack: 4, #locals: 6, #params: 3
    // Code length: 192 bytes, Code offset: 8993
    // Line Number Table found: 26 entries
    // Parameter  0 added: Name connection Type Ljava/sql/Connection; At 0 192 Range 0 191 Init 0
    // Parameter  1 added: Name date Type Ljava/sql/Date; At 0 192 Range 0 191 Init 0
    // Parameter  2 added: Name calendar Type Ljava/util/Calendar; At 0 192 Range 0 191 Init 0
    // RetValue   6 added: Name <returnValue> Type [B At 0 192 Range 0 191 Init 0 fixed
    // LocalVar   3 added: Name abyte0 Type [B At 11 180 Range 11 190 Init 11
    // LocalVar   4 added: Name calendar1 Type Ljava/util/Calendar; At 15 169 Range 15 183 Init 15
    // LocalVar   5 added: Name flag Type Z At 36 2 Range 36 37 Init 36
    // LocalVar   5 added: Name flag1 Type Z At 42 2 Range 42 43 Init 42
    // LocalVar   5 name flag1(Z) merged out into flag(Z)
    public static byte[] toBytes(Connection connection, Date date, Calendar calendar)
        throws SQLException
    {
        if(date == null)
        {
            return null;
        }
        byte abyte0[] = new byte[SIZE_TIMESTAMPLTZ];
        Calendar calendar1 = Calendar.getInstance();
        calendar1.setTime(date);
        boolean flag;
        if(calendar1.getTimeZone().inDaylightTime(date))
        {
            flag = true;
        } else
        {
            flag = false;
        }
        calendar1.set(11, 0);
        calendar1.set(12, 0);
        calendar1.set(13, 0);
        TimeZoneAdjust(connection, calendar1, calendar);
        abyte0[0] = (byte)(calendar.get(1) / 100 + 100);
        abyte0[1] = (byte)(calendar.get(1) % 100 + 100);
        abyte0[2] = (byte)(calendar.get(2) + 1);
        abyte0[3] = (byte)calendar.get(5);
        abyte0[4] = (byte)(calendar.get(11) + 1);
        abyte0[5] = (byte)(calendar.get(12) + 1);
        abyte0[6] = (byte)(calendar.get(13) + 1);
        abyte0[7] = 0;
        abyte0[8] = 0;
        abyte0[9] = 0;
        abyte0[10] = 0;
        TimeZone.setDefault(calendar1.getTimeZone());
        return abyte0;
    }

    // Decompiling method: toBytes  Signature: (Ljava/sql/Connection;Ljava/sql/Time;Ljava/util/Calendar;)[B
    // Max stack: 5, #locals: 6, #params: 3
    // Code length: 209 bytes, Code offset: 9339
    // Line Number Table found: 26 entries
    // Parameter  0 added: Name connection Type Ljava/sql/Connection; At 0 209 Range 0 208 Init 0
    // Parameter  1 added: Name time Type Ljava/sql/Time; At 0 209 Range 0 208 Init 0
    // Parameter  2 added: Name calendar Type Ljava/util/Calendar; At 0 209 Range 0 208 Init 0
    // RetValue   6 added: Name <returnValue> Type [B At 0 209 Range 0 208 Init 0 fixed
    // LocalVar   3 added: Name abyte0 Type [B At 11 197 Range 11 207 Init 11
    // LocalVar   4 added: Name calendar1 Type Ljava/util/Calendar; At 15 186 Range 15 200 Init 15
    // LocalVar   5 added: Name flag Type Z At 35 2 Range 35 36 Init 35
    // LocalVar   5 added: Name flag1 Type Z At 41 2 Range 41 42 Init 41
    // LocalVar   5 name flag1(Z) merged out into flag(Z)
    public static byte[] toBytes(Connection connection, Time time, Calendar calendar)
        throws SQLException
    {
        if(time == null)
        {
            return null;
        }
        byte abyte0[] = new byte[SIZE_TIMESTAMPLTZ];
        Calendar calendar1 = Calendar.getInstance();
        calendar1.setTime(time);
        boolean flag;
        if(calendar.getTimeZone().inDaylightTime(time))
        {
            flag = true;
        } else
        {
            flag = false;
        }
        calendar1.set(1, (CENTURY_DEFAULT - 100) * 100 + DECADE_DEFAULT % 100);
        calendar1.set(2, MONTH_DEFAULT - 1);
        calendar1.set(5, DAY_DEFAULT);
        TimeZoneAdjust(connection, calendar1, calendar);
        abyte0[0] = (byte)(calendar.get(1) / 100 + 100);
        abyte0[1] = (byte)(calendar.get(1) % 100 + 100);
        abyte0[2] = (byte)(calendar.get(2) + 1);
        abyte0[3] = (byte)calendar.get(5);
        abyte0[4] = (byte)(calendar.get(11) + 1);
        abyte0[5] = (byte)(calendar.get(12) + 1);
        abyte0[6] = (byte)(calendar.get(13) + 1);
        abyte0[7] = 0;
        abyte0[8] = 0;
        abyte0[9] = 0;
        abyte0[10] = 0;
        TimeZone.setDefault(calendar1.getTimeZone());
        return abyte0;
    }

    // Decompiling method: toBytes  Signature: (Ljava/sql/Connection;Ljava/sql/Timestamp;Ljava/util/Calendar;)[B
    // Max stack: 4, #locals: 6, #params: 3
    // Code length: 205 bytes, Code offset: 9702
    // Line Number Table found: 23 entries
    // Parameter  0 added: Name connection Type Ljava/sql/Connection; At 0 205 Range 0 204 Init 0
    // Parameter  1 added: Name timestamp Type Ljava/sql/Timestamp; At 0 205 Range 0 204 Init 0
    // Parameter  2 added: Name calendar Type Ljava/util/Calendar; At 0 205 Range 0 204 Init 0
    // RetValue   6 added: Name <returnValue> Type [B At 0 205 Range 0 204 Init 0 fixed
    // LocalVar   3 added: Name abyte0 Type [B At 11 193 Range 11 203 Init 11
    // LocalVar   4 added: Name calendar1 Type Ljava/util/Calendar; At 15 182 Range 15 196 Init 15
    // LocalVar   5 added: Name flag Type Z At 36 2 Range 36 37 Init 36
    // LocalVar   5 added: Name flag1 Type Z At 42 2 Range 42 43 Init 42
    // LocalVar   5 name flag1(Z) merged out into flag(Z)
    public static byte[] toBytes(Connection connection, Timestamp timestamp, Calendar calendar)
        throws SQLException
    {
        if(timestamp == null)
        {
            return null;
        }
        byte abyte0[] = new byte[SIZE_TIMESTAMPLTZ];
        Calendar calendar1 = Calendar.getInstance();
        calendar1.setTime(timestamp);
        boolean flag;
        if(calendar1.getTimeZone().inDaylightTime(timestamp))
        {
            flag = true;
        } else
        {
            flag = false;
        }
        TimeZoneAdjust(connection, calendar1, calendar);
        abyte0[0] = (byte)(calendar.get(1) / 100 + 100);
        abyte0[1] = (byte)(calendar.get(1) % 100 + 100);
        abyte0[2] = (byte)(calendar.get(2) + 1);
        abyte0[3] = (byte)calendar.get(5);
        abyte0[4] = (byte)(calendar.get(11) + 1);
        abyte0[5] = (byte)(calendar.get(12) + 1);
        abyte0[6] = (byte)(calendar.get(13) + 1);
        abyte0[7] = (byte)(timestamp.getNanos() >> 24);
        abyte0[8] = (byte)(timestamp.getNanos() >> 16 & 0xff);
        abyte0[9] = (byte)(timestamp.getNanos() >> 8 & 0xff);
        abyte0[10] = (byte)(timestamp.getNanos() & 0xff);
        TimeZone.setDefault(calendar1.getTimeZone());
        return abyte0;
    }

    // Decompiling method: toBytes  Signature: (Ljava/sql/Connection;Ljava/util/Calendar;Ljava/lang/String;)[B
    // Max stack: 3, #locals: 3, #params: 3
    // Code length: 10 bytes, Code offset: 10049
    // Line Number Table found: 1 entries
    // Parameter  0 added: Name connection Type Ljava/sql/Connection; At 0 10 Range 0 9 Init 0
    // Parameter  1 added: Name calendar Type Ljava/util/Calendar; At 0 10 Range 0 9 Init 0
    // Parameter  2 added: Name s Type Ljava/lang/String; At 0 10 Range 0 9 Init 0
    // RetValue   3 added: Name <returnValue> Type [B At 0 10 Range 0 9 Init 0 fixed
    public static byte[] toBytes(Connection connection, Calendar calendar, String s)
        throws SQLException
    {
        return toBytes(connection, calendar, Timestamp.valueOf(s));
    }

    // Decompiling method: toBytes  Signature: (Ljava/sql/Connection;Ljava/util/Calendar;Ljava/sql/Date;)[B
    // Max stack: 4, #locals: 10, #params: 3
    // Code length: 244 bytes, Code offset: 10107
    // Line Number Table found: 34 entries
    // Parameter  0 added: Name connection Type Ljava/sql/Connection; At 0 244 Range 0 243 Init 0
    // Parameter  1 added: Name calendar Type Ljava/util/Calendar; At 0 244 Range 0 243 Init 0
    // Parameter  2 added: Name date Type Ljava/sql/Date; At 0 244 Range 0 243 Init 0
    // RetValue  10 added: Name <returnValue> Type [B At 0 244 Range 0 243 Init 0 fixed
    // LocalVar   3 added: Name abyte0 Type [B At 11 232 Range 11 242 Init 11
    // LocalVar   4 added: Name timezone Type Ljava/util/TimeZone; At 15 224 Range 15 238 Init 15
    // LocalVar   5 added: Name obj Type A At 18 2 Range 18 19 Init 18
    // LocalVar   6 added: Name obj1 Type A At 21 2 Range 21 22 Init 21
    // LocalVar   5 added: Name oraclepreparedstatement Type Loracle/jdbc/OraclePreparedStatement; At 34 4 Range 34 37 Init 34
    // LocalVar   6 added: Name resultset Type Ljava/sql/ResultSet; At 43 12 Range 43 54 Init 43
    // LocalVar   7 added: Name s Type Ljava/lang/String; At 61 4 Range 61 64 Init 61
    // LocalVar   8 added: Name calendar1 Type Ljava/util/Calendar; At 68 140 Range 68 207 Init 68
    // LocalVar   9 added: Name flag Type Z At 87 2 Range 87 88 Init 87
    // LocalVar   9 added: Name flag1 Type Z At 93 2 Range 93 94 Init 93
    // LocalVar   5 chged: Name oraclepreparedstatement1 Oname obj Type Loracle/jdbc/OraclePreparedStatement; At 18 2 Range 18 19 Init 18
    // LocalVar   5 name oraclepreparedstatement(Loracle/jdbc/OraclePreparedStatement;) merged out into oraclepreparedstatement1(Loracle/jdbc/OraclePreparedStatement;)
    // LocalVar   6 chged: Name resultset1 Oname obj1 Type Ljava/sql/ResultSet; At 21 2 Range 21 22 Init 21
    // LocalVar   6 name resultset(Ljava/sql/ResultSet;) merged out into resultset1(Ljava/sql/ResultSet;)
    // LocalVar   9 name flag1(Z) merged out into flag(Z)
    public static byte[] toBytes(Connection connection, Calendar calendar, Date date)
        throws SQLException
    {
        if(date == null)
        {
            return null;
        }
        byte abyte0[] = new byte[SIZE_TIMESTAMPLTZ];
        TimeZone timezone = TimeZone.getDefault();
        OraclePreparedStatement oraclepreparedstatement = null;
        ResultSet resultset = null;
        oraclepreparedstatement = (OraclePreparedStatement)connection.prepareStatement("SELECT DBTIMEZONE FROM DUAL");
        resultset = oraclepreparedstatement.executeQuery();
        resultset.next();
        String s = resultset.getString(1);
        Calendar calendar1 = getDbTzCalendar(s);
        calendar.setTime(date);
        boolean flag;
        if(calendar.getTimeZone().inDaylightTime(date))
        {
            flag = true;
        } else
        {
            flag = false;
        }
        calendar.set(11, 0);
        calendar.set(12, 0);
        calendar.set(13, 0);
        TimeZoneAdjust(connection, calendar, calendar1);
        abyte0[0] = (byte)(calendar1.get(1) / 100 + 100);
        abyte0[1] = (byte)(calendar1.get(1) % 100 + 100);
        abyte0[2] = (byte)(calendar1.get(2) + 1);
        abyte0[3] = (byte)calendar1.get(5);
        abyte0[4] = (byte)(calendar1.get(11) + 1);
        abyte0[5] = (byte)(calendar1.get(12) + 1);
        abyte0[6] = (byte)(calendar1.get(13) + 1);
        abyte0[7] = 0;
        abyte0[8] = 0;
        abyte0[9] = 0;
        abyte0[10] = 0;
        TimeZone.setDefault(timezone);
        return abyte0;
    }

    // Decompiling method: toBytes  Signature: (Ljava/sql/Connection;Ljava/util/Calendar;Ljava/sql/Time;)[B
    // Max stack: 5, #locals: 10, #params: 3
    // Code length: 263 bytes, Code offset: 10531
    // Line Number Table found: 34 entries
    // Parameter  0 added: Name connection Type Ljava/sql/Connection; At 0 263 Range 0 262 Init 0
    // Parameter  1 added: Name calendar Type Ljava/util/Calendar; At 0 263 Range 0 262 Init 0
    // Parameter  2 added: Name time Type Ljava/sql/Time; At 0 263 Range 0 262 Init 0
    // RetValue  10 added: Name <returnValue> Type [B At 0 263 Range 0 262 Init 0 fixed
    // LocalVar   3 added: Name abyte0 Type [B At 11 251 Range 11 261 Init 11
    // LocalVar   4 added: Name timezone Type Ljava/util/TimeZone; At 15 243 Range 15 257 Init 15
    // LocalVar   5 added: Name obj Type A At 18 2 Range 18 19 Init 18
    // LocalVar   6 added: Name obj1 Type A At 21 2 Range 21 22 Init 21
    // LocalVar   5 added: Name oraclepreparedstatement Type Loracle/jdbc/OraclePreparedStatement; At 34 4 Range 34 37 Init 34
    // LocalVar   6 added: Name resultset Type Ljava/sql/ResultSet; At 43 12 Range 43 54 Init 43
    // LocalVar   7 added: Name s Type Ljava/lang/String; At 61 4 Range 61 64 Init 61
    // LocalVar   8 added: Name calendar1 Type Ljava/util/Calendar; At 68 159 Range 68 226 Init 68
    // LocalVar   9 added: Name flag Type Z At 88 2 Range 88 89 Init 88
    // LocalVar   9 added: Name flag1 Type Z At 94 2 Range 94 95 Init 94
    // LocalVar   5 chged: Name oraclepreparedstatement1 Oname obj Type Loracle/jdbc/OraclePreparedStatement; At 18 2 Range 18 19 Init 18
    // LocalVar   5 name oraclepreparedstatement(Loracle/jdbc/OraclePreparedStatement;) merged out into oraclepreparedstatement1(Loracle/jdbc/OraclePreparedStatement;)
    // LocalVar   6 chged: Name resultset1 Oname obj1 Type Ljava/sql/ResultSet; At 21 2 Range 21 22 Init 21
    // LocalVar   6 name resultset(Ljava/sql/ResultSet;) merged out into resultset1(Ljava/sql/ResultSet;)
    // LocalVar   9 name flag1(Z) merged out into flag(Z)
    public static byte[] toBytes(Connection connection, Calendar calendar, Time time)
        throws SQLException
    {
        if(time == null)
        {
            return null;
        }
        byte abyte0[] = new byte[SIZE_TIMESTAMPLTZ];
        TimeZone timezone = TimeZone.getDefault();
        OraclePreparedStatement oraclepreparedstatement = null;
        ResultSet resultset = null;
        oraclepreparedstatement = (OraclePreparedStatement)connection.prepareStatement("SELECT DBTIMEZONE FROM DUAL");
        resultset = oraclepreparedstatement.executeQuery();
        resultset.next();
        String s = resultset.getString(1);
        Calendar calendar1 = getDbTzCalendar(s);
        calendar.setTime(time);
        boolean flag;
        if(calendar1.getTimeZone().inDaylightTime(time))
        {
            flag = true;
        } else
        {
            flag = false;
        }
        calendar.set(1, (CENTURY_DEFAULT - 100) * 100 + DECADE_DEFAULT % 100);
        calendar.set(2, MONTH_DEFAULT - 1);
        calendar.set(5, DAY_DEFAULT);
        TimeZoneAdjust(connection, calendar, calendar1);
        abyte0[0] = (byte)(calendar1.get(1) / 100 + 100);
        abyte0[1] = (byte)(calendar1.get(1) % 100 + 100);
        abyte0[2] = (byte)(calendar1.get(2) + 1);
        abyte0[3] = (byte)calendar1.get(5);
        abyte0[4] = (byte)(calendar1.get(11) + 1);
        abyte0[5] = (byte)(calendar1.get(12) + 1);
        abyte0[6] = (byte)(calendar1.get(13) + 1);
        abyte0[7] = 0;
        abyte0[8] = 0;
        abyte0[9] = 0;
        abyte0[10] = 0;
        TimeZone.setDefault(timezone);
        return abyte0;
    }

    // Decompiling method: toBytes  Signature: (Ljava/sql/Connection;Ljava/util/Calendar;Ljava/sql/Timestamp;)[B
    // Max stack: 4, #locals: 10, #params: 3
    // Code length: 260 bytes, Code offset: 10974
    // Line Number Table found: 31 entries
    // Parameter  0 added: Name connection Type Ljava/sql/Connection; At 0 260 Range 0 259 Init 0
    // Parameter  1 added: Name calendar Type Ljava/util/Calendar; At 0 260 Range 0 259 Init 0
    // Parameter  2 added: Name timestamp Type Ljava/sql/Timestamp; At 0 260 Range 0 259 Init 0
    // RetValue  10 added: Name <returnValue> Type [B At 0 260 Range 0 259 Init 0 fixed
    // LocalVar   3 added: Name abyte0 Type [B At 11 248 Range 11 258 Init 11
    // LocalVar   4 added: Name timezone Type Ljava/util/TimeZone; At 15 240 Range 15 254 Init 15
    // LocalVar   5 added: Name obj Type A At 18 2 Range 18 19 Init 18
    // LocalVar   6 added: Name obj1 Type A At 21 2 Range 21 22 Init 21
    // LocalVar   5 added: Name oraclepreparedstatement Type Loracle/jdbc/OraclePreparedStatement; At 34 4 Range 34 37 Init 34
    // LocalVar   6 added: Name resultset Type Ljava/sql/ResultSet; At 43 12 Range 43 54 Init 43
    // LocalVar   7 added: Name s Type Ljava/lang/String; At 61 4 Range 61 64 Init 61
    // LocalVar   8 added: Name calendar1 Type Ljava/util/Calendar; At 68 119 Range 68 186 Init 68
    // LocalVar   9 added: Name flag Type Z At 87 2 Range 87 88 Init 87
    // LocalVar   9 added: Name flag1 Type Z At 93 2 Range 93 94 Init 93
    // LocalVar   5 chged: Name oraclepreparedstatement1 Oname obj Type Loracle/jdbc/OraclePreparedStatement; At 18 2 Range 18 19 Init 18
    // LocalVar   5 name oraclepreparedstatement(Loracle/jdbc/OraclePreparedStatement;) merged out into oraclepreparedstatement1(Loracle/jdbc/OraclePreparedStatement;)
    // LocalVar   6 chged: Name resultset1 Oname obj1 Type Ljava/sql/ResultSet; At 21 2 Range 21 22 Init 21
    // LocalVar   6 name resultset(Ljava/sql/ResultSet;) merged out into resultset1(Ljava/sql/ResultSet;)
    // LocalVar   9 name flag1(Z) merged out into flag(Z)
    public static byte[] toBytes(Connection connection, Calendar calendar, Timestamp timestamp)
        throws SQLException
    {
        if(timestamp == null)
        {
            return null;
        }
        byte abyte0[] = new byte[SIZE_TIMESTAMPLTZ];
        TimeZone timezone = TimeZone.getDefault();
        OraclePreparedStatement oraclepreparedstatement = null;
        ResultSet resultset = null;
        oraclepreparedstatement = (OraclePreparedStatement)connection.prepareStatement("SELECT DBTIMEZONE FROM DUAL");
        resultset = oraclepreparedstatement.executeQuery();
        resultset.next();
        String s = resultset.getString(1);
        Calendar calendar1 = getDbTzCalendar(s);
        calendar.setTime(timestamp);
        boolean flag;
        if(calendar.getTimeZone().inDaylightTime(timestamp))
        {
            flag = true;
        } else
        {
            flag = false;
        }
        TimeZoneAdjust(connection, calendar, calendar1);
        abyte0[0] = (byte)(calendar1.get(1) / 100 + 100);
        abyte0[1] = (byte)(calendar1.get(1) % 100 + 100);
        abyte0[2] = (byte)(calendar1.get(2) + 1);
        abyte0[3] = (byte)calendar1.get(5);
        abyte0[4] = (byte)(calendar1.get(11) + 1);
        abyte0[5] = (byte)(calendar1.get(12) + 1);
        abyte0[6] = (byte)(calendar1.get(13) + 1);
        abyte0[7] = (byte)(timestamp.getNanos() >> 24);
        abyte0[8] = (byte)(timestamp.getNanos() >> 16 & 0xff);
        abyte0[9] = (byte)(timestamp.getNanos() >> 8 & 0xff);
        abyte0[10] = (byte)(timestamp.getNanos() & 0xff);
        TimeZone.setDefault(timezone);
        return abyte0;
    }

    // Decompiling method: toBytes  Signature: (Ljava/sql/Connection;Ljava/util/Calendar;Loracle/sql/DATE;)[B
    // Max stack: 5, #locals: 10, #params: 3
    // Code length: 222 bytes, Code offset: 11402
    // Line Number Table found: 27 entries
    // Parameter  0 added: Name connection Type Ljava/sql/Connection; At 0 222 Range 0 221 Init 0
    // Parameter  1 added: Name calendar Type Ljava/util/Calendar; At 0 222 Range 0 221 Init 0
    // Parameter  2 added: Name date Type Loracle/sql/DATE; At 0 222 Range 0 221 Init 0
    // RetValue  10 added: Name <returnValue> Type [B At 0 222 Range 0 221 Init 0 fixed
    // LocalVar   3 added: Name abyte0 Type [B At 11 210 Range 11 220 Init 11
    // LocalVar   4 added: Name timezone Type Ljava/util/TimeZone; At 15 202 Range 15 216 Init 15
    // LocalVar   5 added: Name obj Type A At 18 2 Range 18 19 Init 18
    // LocalVar   6 added: Name obj1 Type A At 21 2 Range 21 22 Init 21
    // LocalVar   5 added: Name oraclepreparedstatement Type Loracle/jdbc/OraclePreparedStatement; At 34 4 Range 34 37 Init 34
    // LocalVar   6 added: Name resultset Type Ljava/sql/ResultSet; At 43 12 Range 43 54 Init 43
    // LocalVar   7 added: Name s Type Ljava/lang/String; At 61 4 Range 61 64 Init 61
    // LocalVar   8 added: Name calendar1 Type Ljava/util/Calendar; At 68 138 Range 68 205 Init 68
    // LocalVar   9 added: Name flag Type Z At 106 2 Range 106 107 Init 106
    // LocalVar   9 added: Name flag1 Type Z At 112 2 Range 112 113 Init 112
    // LocalVar   5 chged: Name oraclepreparedstatement1 Oname obj Type Loracle/jdbc/OraclePreparedStatement; At 18 2 Range 18 19 Init 18
    // LocalVar   5 name oraclepreparedstatement(Loracle/jdbc/OraclePreparedStatement;) merged out into oraclepreparedstatement1(Loracle/jdbc/OraclePreparedStatement;)
    // LocalVar   6 chged: Name resultset1 Oname obj1 Type Ljava/sql/ResultSet; At 21 2 Range 21 22 Init 21
    // LocalVar   6 name resultset(Ljava/sql/ResultSet;) merged out into resultset1(Ljava/sql/ResultSet;)
    // LocalVar   9 name flag1(Z) merged out into flag(Z)
    public static byte[] toBytes(Connection connection, Calendar calendar, DATE date)
        throws SQLException
    {
        if(date == null)
        {
            return null;
        }
        byte abyte0[] = new byte[SIZE_TIMESTAMPLTZ];
        TimeZone timezone = TimeZone.getDefault();
        OraclePreparedStatement oraclepreparedstatement = null;
        ResultSet resultset = null;
        oraclepreparedstatement = (OraclePreparedStatement)connection.prepareStatement("SELECT DBTIMEZONE FROM DUAL");
        resultset = oraclepreparedstatement.executeQuery();
        resultset.next();
        String s = resultset.getString(1);
        Calendar calendar1 = getDbTzCalendar(s);
        calendar.setTime(DATE.toDate(date.toBytes()));
        boolean flag;
        if(calendar.getTimeZone().inDaylightTime(new Date(calendar.getTime().getTime())))
        {
            flag = true;
        } else
        {
            flag = false;
        }
        TimeZoneAdjust(connection, calendar, calendar1);
        abyte0[0] = (byte)(calendar1.get(1) / 100 + 100);
        abyte0[1] = (byte)(calendar1.get(1) % 100 + 100);
        abyte0[2] = (byte)(calendar1.get(2) + 1);
        abyte0[3] = (byte)calendar1.get(5);
        abyte0[4] = (byte)(calendar1.get(11) + 1);
        abyte0[5] = (byte)(calendar1.get(12) + 1);
        abyte0[6] = (byte)(calendar1.get(13) + 1);
        TimeZone.setDefault(timezone);
        return abyte0;
    }

    // Decompiling method: toBytes  Signature: (Ljava/sql/Connection;Loracle/sql/DATE;Ljava/util/Calendar;)[B
    // Max stack: 5, #locals: 6, #params: 3
    // Code length: 168 bytes, Code offset: 11776
    // Line Number Table found: 19 entries
    // Parameter  0 added: Name connection Type Ljava/sql/Connection; At 0 168 Range 0 167 Init 0
    // Parameter  1 added: Name date Type Loracle/sql/DATE; At 0 168 Range 0 167 Init 0
    // Parameter  2 added: Name calendar Type Ljava/util/Calendar; At 0 168 Range 0 167 Init 0
    // RetValue   6 added: Name <returnValue> Type [B At 0 168 Range 0 167 Init 0 fixed
    // LocalVar   3 added: Name abyte0 Type [B At 11 156 Range 11 166 Init 11
    // LocalVar   4 added: Name calendar1 Type Ljava/util/Calendar; At 15 145 Range 15 159 Init 15
    // LocalVar   5 added: Name flag Type Z At 56 2 Range 56 57 Init 56
    // LocalVar   5 added: Name flag1 Type Z At 62 2 Range 62 63 Init 62
    // LocalVar   5 name flag1(Z) merged out into flag(Z)
    public static byte[] toBytes(Connection connection, DATE date, Calendar calendar)
        throws SQLException
    {
        if(date == null)
        {
            return null;
        }
        byte abyte0[] = new byte[SIZE_TIMESTAMPLTZ];
        Calendar calendar1 = Calendar.getInstance();
        calendar1.setTime(DATE.toDate(date.toBytes()));
        boolean flag;
        if(calendar1.getTimeZone().inDaylightTime(new Date(calendar1.getTime().getTime())))
        {
            flag = true;
        } else
        {
            flag = false;
        }
        TimeZoneAdjust(connection, calendar1, calendar);
        abyte0[0] = (byte)(calendar.get(1) / 100 + 100);
        abyte0[1] = (byte)(calendar.get(1) % 100 + 100);
        abyte0[2] = (byte)(calendar.get(2) + 1);
        abyte0[3] = (byte)calendar.get(5);
        abyte0[4] = (byte)(calendar.get(11) + 1);
        abyte0[5] = (byte)(calendar.get(12) + 1);
        abyte0[6] = (byte)(calendar.get(13) + 1);
        TimeZone.setDefault(calendar1.getTimeZone());
        return abyte0;
    }

    // Decompiling method: toDATE  Signature: (Ljava/sql/Connection;[B)Loracle/sql/DATE;
    // Max stack: 6, #locals: 13, #params: 2
    // Code length: 218 bytes, Code offset: 12070
    // Line Number Table found: 26 entries
    // Parameter  0 added: Name connection Type Ljava/sql/Connection; At 0 218 Range 0 217 Init 0
    // Parameter  1 added: Name abyte0 Type [B At 0 218 Range 0 217 Init 0
    // RetValue  13 added: Name <returnValue> Type Loracle/sql/DATE; At 0 218 Range 0 217 Init 0 fixed
    // LocalVar   2 added: Name ai Type [I At 5 165 Range 5 169 Init 5
    // LocalVar   3 added: Name flag Type Z At 7 18 Range 7 24 Init 7
    // LocalVar   3 chged: Name i Oname flag Type I At 24 1 Range 7 24 Init 7
    // LocalVar   4 added: Name timezone Type Ljava/util/TimeZone; At 33 165 Range 33 197 Init 33
    // LocalVar   5 added: Name obj Type A At 36 2 Range 36 37 Init 36
    // LocalVar   6 added: Name obj1 Type A At 39 2 Range 39 40 Init 39
    // LocalVar   5 added: Name oraclepreparedstatement Type Loracle/jdbc/OraclePreparedStatement; At 52 4 Range 52 55 Init 52
    // LocalVar   6 added: Name resultset Type Ljava/sql/ResultSet; At 61 12 Range 61 72 Init 61
    // LocalVar   7 added: Name s Type Ljava/lang/String; At 79 4 Range 79 82 Init 79
    // LocalVar   8 added: Name calendar Type Ljava/util/Calendar; At 86 95 Range 86 180 Init 86
    // LocalVar   9 added: Name calendar1 Type Ljava/util/Calendar; At 92 96 Range 92 187 Init 92
    // LocalVar  10 added: Name j Type I At 103 15 Range 103 117 Init 103
    // LocalVar  11 added: Name l Type J At 194 17 Range 194 210 Init 194
    // LocalVar   5 chged: Name oraclepreparedstatement1 Oname obj Type Loracle/jdbc/OraclePreparedStatement; At 36 2 Range 36 37 Init 36
    // LocalVar   5 name oraclepreparedstatement(Loracle/jdbc/OraclePreparedStatement;) merged out into oraclepreparedstatement1(Loracle/jdbc/OraclePreparedStatement;)
    // LocalVar   6 chged: Name resultset1 Oname obj1 Type Ljava/sql/ResultSet; At 39 2 Range 39 40 Init 39
    // LocalVar   6 name resultset(Ljava/sql/ResultSet;) merged out into resultset1(Ljava/sql/ResultSet;)
    public static DATE toDATE(Connection connection, byte abyte0[])
        throws SQLException
    {
        int ai[] = new int[SIZE_TIMESTAMPLTZ];
        for(int i = 0; i < abyte0.length; i++)
        {
            ai[i] = abyte0[i] & 0xff;
        }

        TimeZone timezone = TimeZone.getDefault();
        OraclePreparedStatement oraclepreparedstatement = null;
        ResultSet resultset = null;
        oraclepreparedstatement = (OraclePreparedStatement)connection.prepareStatement("SELECT DBTIMEZONE FROM DUAL");
        resultset = oraclepreparedstatement.executeQuery();
        resultset.next();
        String s = resultset.getString(1);
        Calendar calendar = getDbTzCalendar(s);
        Calendar calendar1 = getSessCalendar(connection);
        int j = getJavaYear(ai[0], ai[1]);
        TimeZone.setDefault(calendar.getTimeZone());
        calendar.set(1, j);
        calendar.set(2, ai[2] - 1);
        calendar.set(5, ai[3]);
        calendar.set(11, ai[4] - 1);
        calendar.set(12, ai[5] - 1);
        calendar.set(13, ai[6] - 1);
        TimeZoneAdjust(connection, calendar, calendar1);
        long l = calendar1.getTime().getTime();
        TimeZone.setDefault(timezone);
        return new DATE(new Date(l));
    }

    // Decompiling method: toDATE  Signature: (Ljava/sql/Connection;[BLjava/util/Calendar;)Loracle/sql/DATE;
    // Max stack: 6, #locals: 9, #params: 3
    // Code length: 158 bytes, Code offset: 12436
    // Line Number Table found: 17 entries
    // Parameter  0 added: Name connection Type Ljava/sql/Connection; At 0 158 Range 0 157 Init 0
    // Parameter  1 added: Name abyte0 Type [B At 0 158 Range 0 157 Init 0
    // Parameter  2 added: Name calendar Type Ljava/util/Calendar; At 0 158 Range 0 157 Init 0
    // RetValue   9 added: Name <returnValue> Type Loracle/sql/DATE; At 0 158 Range 0 157 Init 0 fixed
    // LocalVar   3 added: Name ai Type [I At 5 103 Range 5 107 Init 5
    // LocalVar   4 added: Name flag Type Z At 7 22 Range 7 28 Init 7
    // LocalVar   4 chged: Name i Oname flag Type I At 27 2 Range 7 28 Init 7
    // LocalVar   5 added: Name j Type I At 43 18 Range 43 60 Init 43
    // LocalVar   6 added: Name calendar1 Type Ljava/util/Calendar; At 48 87 Range 48 134 Init 48
    // LocalVar   7 added: Name l Type J At 131 20 Range 131 150 Init 131
    public static DATE toDATE(Connection connection, byte abyte0[], Calendar calendar)
        throws SQLException
    {
        int ai[] = new int[SIZE_TIMESTAMPLTZ];
        for(int i = 0; i < abyte0.length; i++)
        {
            ai[i] = abyte0[i] & 0xff;
        }

        int j = getJavaYear(ai[0], ai[1]);
        Calendar calendar1 = Calendar.getInstance();
        TimeZone.setDefault(calendar.getTimeZone());
        calendar.set(1, j);
        calendar.set(2, ai[2] - 1);
        calendar.set(5, ai[3]);
        calendar.set(11, ai[4] - 1);
        calendar.set(12, ai[5] - 1);
        calendar.set(13, ai[6] - 1);
        TimeZoneAdjust(connection, calendar, calendar1);
        long l = calendar1.getTime().getTime();
        TimeZone.setDefault(calendar1.getTimeZone());
        return new DATE(new Date(l));
    }

    // Decompiling method: toDate  Signature: (Ljava/sql/Connection;[B)Ljava/sql/Date;
    // Max stack: 4, #locals: 13, #params: 2
    // Code length: 219 bytes, Code offset: 12706
    // Line Number Table found: 27 entries
    // Parameter  0 added: Name connection Type Ljava/sql/Connection; At 0 219 Range 0 218 Init 0
    // Parameter  1 added: Name abyte0 Type [B At 0 219 Range 0 218 Init 0
    // RetValue  13 added: Name <returnValue> Type Ljava/sql/Date; At 0 219 Range 0 218 Init 0 fixed
    // LocalVar   2 added: Name ai Type [I At 5 165 Range 5 169 Init 5
    // LocalVar   3 added: Name flag Type Z At 7 18 Range 7 24 Init 7
    // LocalVar   3 chged: Name i Oname flag Type I At 24 1 Range 7 24 Init 7
    // LocalVar   4 added: Name timezone Type Ljava/util/TimeZone; At 33 173 Range 33 205 Init 33
    // LocalVar   5 added: Name obj Type A At 36 2 Range 36 37 Init 36
    // LocalVar   6 added: Name obj1 Type A At 39 2 Range 39 40 Init 39
    // LocalVar   5 added: Name oraclepreparedstatement Type Loracle/jdbc/OraclePreparedStatement; At 52 4 Range 52 55 Init 52
    // LocalVar   6 added: Name resultset Type Ljava/sql/ResultSet; At 61 12 Range 61 72 Init 61
    // LocalVar   7 added: Name s Type Ljava/lang/String; At 79 4 Range 79 82 Init 79
    // LocalVar   8 added: Name calendar Type Ljava/util/Calendar; At 86 103 Range 86 188 Init 86
    // LocalVar   9 added: Name calendar1 Type Ljava/util/Calendar; At 92 104 Range 92 195 Init 92
    // LocalVar  10 added: Name j Type I At 103 15 Range 103 117 Init 103
    // LocalVar  11 added: Name l Type J At 202 13 Range 202 214 Init 202
    // LocalVar   5 chged: Name oraclepreparedstatement1 Oname obj Type Loracle/jdbc/OraclePreparedStatement; At 36 2 Range 36 37 Init 36
    // LocalVar   5 name oraclepreparedstatement(Loracle/jdbc/OraclePreparedStatement;) merged out into oraclepreparedstatement1(Loracle/jdbc/OraclePreparedStatement;)
    // LocalVar   6 chged: Name resultset1 Oname obj1 Type Ljava/sql/ResultSet; At 39 2 Range 39 40 Init 39
    // LocalVar   6 name resultset(Ljava/sql/ResultSet;) merged out into resultset1(Ljava/sql/ResultSet;)
    public static Date toDate(Connection connection, byte abyte0[])
        throws SQLException
    {
        int ai[] = new int[SIZE_TIMESTAMPLTZ];
        for(int i = 0; i < abyte0.length; i++)
        {
            ai[i] = abyte0[i] & 0xff;
        }

        TimeZone timezone = TimeZone.getDefault();
        OraclePreparedStatement oraclepreparedstatement = null;
        ResultSet resultset = null;
        oraclepreparedstatement = (OraclePreparedStatement)connection.prepareStatement("SELECT DBTIMEZONE FROM DUAL");
        resultset = oraclepreparedstatement.executeQuery();
        resultset.next();
        String s = resultset.getString(1);
        Calendar calendar = getDbTzCalendar(s);
        Calendar calendar1 = getSessCalendar(connection);
        int j = getJavaYear(ai[0], ai[1]);
        TimeZone.setDefault(calendar.getTimeZone());
        calendar.set(1, j);
        calendar.set(2, ai[2] - 1);
        calendar.set(5, ai[3]);
        calendar.set(11, ai[4] - 1);
        calendar.set(12, ai[5] - 1);
        calendar.set(13, ai[6] - 1);
        calendar.set(14, 0);
        TimeZoneAdjust(connection, calendar, calendar1);
        long l = calendar1.getTime().getTime();
        TimeZone.setDefault(timezone);
        return new Date(l);
    }

    // Decompiling method: toDate  Signature: (Ljava/sql/Connection;[BLjava/util/Calendar;)Ljava/sql/Date;
    // Max stack: 4, #locals: 9, #params: 3
    // Code length: 150 bytes, Code offset: 13077
    // Line Number Table found: 17 entries
    // Parameter  0 added: Name connection Type Ljava/sql/Connection; At 0 150 Range 0 149 Init 0
    // Parameter  1 added: Name abyte0 Type [B At 0 150 Range 0 149 Init 0
    // Parameter  2 added: Name calendar Type Ljava/util/Calendar; At 0 150 Range 0 149 Init 0
    // RetValue   9 added: Name <returnValue> Type Ljava/sql/Date; At 0 150 Range 0 149 Init 0 fixed
    // LocalVar   3 added: Name ai Type [I At 5 103 Range 5 107 Init 5
    // LocalVar   4 added: Name flag Type Z At 7 22 Range 7 28 Init 7
    // LocalVar   4 chged: Name i Oname flag Type I At 27 2 Range 7 28 Init 7
    // LocalVar   5 added: Name j Type I At 43 18 Range 43 60 Init 43
    // LocalVar   6 added: Name calendar1 Type Ljava/util/Calendar; At 48 84 Range 48 131 Init 48
    // LocalVar   7 added: Name l Type J At 138 8 Range 138 145 Init 138
    public static Date toDate(Connection connection, byte abyte0[], Calendar calendar)
        throws SQLException
    {
        int ai[] = new int[SIZE_TIMESTAMPLTZ];
        for(int i = 0; i < abyte0.length; i++)
        {
            ai[i] = abyte0[i] & 0xff;
        }

        int j = getJavaYear(ai[0], ai[1]);
        Calendar calendar1 = Calendar.getInstance();
        TimeZone.setDefault(calendar.getTimeZone());
        calendar.set(1, j);
        calendar.set(2, ai[2] - 1);
        calendar.set(5, ai[3]);
        calendar.set(11, ai[4] - 1);
        calendar.set(12, ai[5] - 1);
        calendar.set(13, ai[6] - 1);
        calendar.set(14, 0);
        TimeZoneAdjust(connection, calendar, calendar1);
        long l = calendar1.getTime().getTime();
        return new Date(l);
    }

    // Decompiling method: toJdbc  Signature: ()Ljava/lang/Object;
    // Max stack: 1, #locals: 1, #params: 1
    // Code length: 5 bytes, Code offset: 13339
    // Line Number Table found: 1 entries
    // Parameter  0 added: Name this Type Loracle/sql/TIMESTAMPLTZ; At 0 5 Range 0 4 Init 0 fixed
    // RetValue   1 added: Name <returnValue> Type Ljava/lang/Object; At 0 5 Range 0 4 Init 0 fixed
    public Object toJdbc()
        throws SQLException
    {
        return timestampValue();
    }

    // Decompiling method: toString  Signature: (Ljava/sql/Connection;[B)Ljava/lang/String;
    // Max stack: 3, #locals: 11, #params: 2
    // Code length: 207 bytes, Code offset: 13392
    // Line Number Table found: 18 entries
    // Parameter  0 added: Name connection Type Ljava/sql/Connection; At 0 207 Range 0 206 Init 0
    // Parameter  1 added: Name abyte0 Type [B At 0 207 Range 0 206 Init 0
    // RetValue  11 added: Name <returnValue> Type Ljava/lang/String; At 0 207 Range 0 206 Init 0 fixed
    // LocalVar   2 added: Name timestamp Type Ljava/sql/Timestamp; At 5 7 Range 5 11 Init 5
    // LocalVar   3 added: Name calendar Type Ljava/util/Calendar; At 9 46 Range 9 54 Init 9
    // LocalVar   4 added: Name i Type I At 20 117 Range 20 136 Init 20
    // LocalVar   5 added: Name j Type I At 29 121 Range 29 149 Init 29
    // LocalVar   6 added: Name k Type I At 36 124 Range 36 159 Init 36
    // LocalVar   7 added: Name l Type I At 44 126 Range 44 169 Init 44
    // LocalVar   8 added: Name i1 Type I At 52 128 Range 52 179 Init 52
    // LocalVar   9 added: Name j1 Type I At 60 130 Range 60 189 Init 60
    // LocalVar  10 added: Name flag Type Z At 63 137 Range 63 199 Init 63
    // LocalVar  10 chged: Name k1 Oname flag Type I At 84 4 Range 63 199 Init 63
    public static String toString(Connection connection, byte abyte0[])
        throws SQLException
    {
        Timestamp timestamp = toTimestamp(connection, abyte0);
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(timestamp);
        int i = calendar.get(1);
        int j = calendar.get(2) + 1;
        int k = calendar.get(5);
        int l = calendar.get(11);
        int i1 = calendar.get(12);
        int j1 = calendar.get(13);
        int k1 = 0;
        if(abyte0.length == SIZE_TIMESTAMPLTZ)
        {
            k1 = (abyte0[7] & 0xff) << 24;
            k1 |= (abyte0[8] & 0xff) << 16;
            k1 |= (abyte0[9] & 0xff) << 8;
            k1 |= abyte0[10] & 0xff;
        }
        return i + "-" + j + "-" + k + " " + l + "." + i1 + "." + j1 + "." + k1;
    }

    // Decompiling method: toString  Signature: (Ljava/sql/Connection;[BLjava/util/Calendar;)Ljava/lang/String;
    // Max stack: 3, #locals: 12, #params: 3
    // Code length: 220 bytes, Code offset: 13715
    // Line Number Table found: 18 entries
    // Parameter  0 added: Name connection Type Ljava/sql/Connection; At 0 220 Range 0 219 Init 0
    // Parameter  1 added: Name abyte0 Type [B At 0 220 Range 0 219 Init 0
    // Parameter  2 added: Name calendar Type Ljava/util/Calendar; At 0 220 Range 0 219 Init 0
    // RetValue  12 added: Name <returnValue> Type Ljava/lang/String; At 0 220 Range 0 219 Init 0 fixed
    // LocalVar   3 added: Name timestamp Type Ljava/sql/Timestamp; At 6 9 Range 6 14 Init 6
    // LocalVar   4 added: Name calendar1 Type Ljava/util/Calendar; At 10 54 Range 10 63 Init 10
    // LocalVar   5 added: Name i Type I At 24 126 Range 24 149 Init 24
    // LocalVar   6 added: Name j Type I At 34 129 Range 34 162 Init 34
    // LocalVar   7 added: Name k Type I At 42 131 Range 42 172 Init 42
    // LocalVar   8 added: Name l Type I At 51 132 Range 51 182 Init 51
    // LocalVar   9 added: Name i1 Type I At 60 133 Range 60 192 Init 60
    // LocalVar  10 added: Name j1 Type I At 69 134 Range 69 202 Init 69
    // LocalVar  11 added: Name flag Type Z At 72 141 Range 72 212 Init 72
    // LocalVar  11 chged: Name k1 Oname flag Type I At 93 4 Range 72 212 Init 72
    public static String toString(Connection connection, byte abyte0[], Calendar calendar)
        throws SQLException
    {
        Timestamp timestamp = toTimestamp(connection, abyte0, calendar);
        Calendar calendar1 = Calendar.getInstance();
        calendar1.setTime(timestamp);
        int i = calendar1.get(1);
        int j = calendar1.get(2) + 1;
        int k = calendar1.get(5);
        int l = calendar1.get(11);
        int i1 = calendar1.get(12);
        int j1 = calendar1.get(13);
        int k1 = 0;
        if(abyte0.length == SIZE_TIMESTAMPLTZ)
        {
            k1 = (abyte0[7] & 0xff) << 24;
            k1 |= (abyte0[8] & 0xff) << 16;
            k1 |= (abyte0[9] & 0xff) << 8;
            k1 |= abyte0[10] & 0xff & 0xff;
        }
        return i + "-" + j + "-" + k + " " + l + "." + i1 + "." + j1 + "." + k1;
    }

    // Decompiling method: toTime  Signature: (Ljava/sql/Connection;[B)Ljava/sql/Time;
    // Max stack: 4, #locals: 13, #params: 2
    // Code length: 211 bytes, Code offset: 14057
    // Line Number Table found: 26 entries
    // Parameter  0 added: Name connection Type Ljava/sql/Connection; At 0 211 Range 0 210 Init 0
    // Parameter  1 added: Name abyte0 Type [B At 0 211 Range 0 210 Init 0
    // RetValue  13 added: Name <returnValue> Type Ljava/sql/Time; At 0 211 Range 0 210 Init 0 fixed
    // LocalVar   2 added: Name ai Type [I At 5 165 Range 5 169 Init 5
    // LocalVar   3 added: Name flag Type Z At 7 18 Range 7 24 Init 7
    // LocalVar   3 chged: Name i Oname flag Type I At 24 1 Range 7 24 Init 7
    // LocalVar   4 added: Name timezone Type Ljava/util/TimeZone; At 33 165 Range 33 197 Init 33
    // LocalVar   5 added: Name obj Type A At 36 2 Range 36 37 Init 36
    // LocalVar   6 added: Name obj1 Type A At 39 2 Range 39 40 Init 39
    // LocalVar   5 added: Name oraclepreparedstatement Type Loracle/jdbc/OraclePreparedStatement; At 52 4 Range 52 55 Init 52
    // LocalVar   6 added: Name resultset Type Ljava/sql/ResultSet; At 61 12 Range 61 72 Init 61
    // LocalVar   7 added: Name s Type Ljava/lang/String; At 79 4 Range 79 82 Init 79
    // LocalVar   8 added: Name calendar Type Ljava/util/Calendar; At 86 95 Range 86 180 Init 86
    // LocalVar   9 added: Name calendar1 Type Ljava/util/Calendar; At 92 96 Range 92 187 Init 92
    // LocalVar  10 added: Name j Type I At 103 15 Range 103 117 Init 103
    // LocalVar  11 added: Name l Type J At 194 13 Range 194 206 Init 194
    // LocalVar   5 chged: Name oraclepreparedstatement1 Oname obj Type Loracle/jdbc/OraclePreparedStatement; At 36 2 Range 36 37 Init 36
    // LocalVar   5 name oraclepreparedstatement(Loracle/jdbc/OraclePreparedStatement;) merged out into oraclepreparedstatement1(Loracle/jdbc/OraclePreparedStatement;)
    // LocalVar   6 chged: Name resultset1 Oname obj1 Type Ljava/sql/ResultSet; At 39 2 Range 39 40 Init 39
    // LocalVar   6 name resultset(Ljava/sql/ResultSet;) merged out into resultset1(Ljava/sql/ResultSet;)
    public static Time toTime(Connection connection, byte abyte0[])
        throws SQLException
    {
        int ai[] = new int[SIZE_TIMESTAMPLTZ];
        for(int i = 0; i < abyte0.length; i++)
        {
            ai[i] = abyte0[i] & 0xff;
        }

        TimeZone timezone = TimeZone.getDefault();
        OraclePreparedStatement oraclepreparedstatement = null;
        ResultSet resultset = null;
        oraclepreparedstatement = (OraclePreparedStatement)connection.prepareStatement("SELECT DBTIMEZONE FROM DUAL");
        resultset = oraclepreparedstatement.executeQuery();
        resultset.next();
        String s = resultset.getString(1);
        Calendar calendar = getDbTzCalendar(s);
        Calendar calendar1 = getSessCalendar(connection);
        int j = getJavaYear(ai[0], ai[1]);
        TimeZone.setDefault(calendar.getTimeZone());
        calendar.set(1, j);
        calendar.set(2, ai[2] - 1);
        calendar.set(5, ai[3]);
        calendar.set(11, ai[4] - 1);
        calendar.set(12, ai[5] - 1);
        calendar.set(13, ai[6] - 1);
        TimeZoneAdjust(connection, calendar, calendar1);
        long l = calendar1.getTime().getTime();
        TimeZone.setDefault(timezone);
        return new Time(l);
    }

    // Decompiling method: toTime  Signature: (Ljava/sql/Connection;[BLjava/util/Calendar;)Ljava/sql/Time;
    // Max stack: 4, #locals: 9, #params: 3
    // Code length: 151 bytes, Code offset: 14416
    // Line Number Table found: 17 entries
    // Parameter  0 added: Name connection Type Ljava/sql/Connection; At 0 151 Range 0 150 Init 0
    // Parameter  1 added: Name abyte0 Type [B At 0 151 Range 0 150 Init 0
    // Parameter  2 added: Name calendar Type Ljava/util/Calendar; At 0 151 Range 0 150 Init 0
    // RetValue   9 added: Name <returnValue> Type Ljava/sql/Time; At 0 151 Range 0 150 Init 0 fixed
    // LocalVar   3 added: Name ai Type [I At 5 103 Range 5 107 Init 5
    // LocalVar   4 added: Name flag Type Z At 7 22 Range 7 28 Init 7
    // LocalVar   4 chged: Name i Oname flag Type I At 27 2 Range 7 28 Init 7
    // LocalVar   5 added: Name j Type I At 43 18 Range 43 60 Init 43
    // LocalVar   6 added: Name calendar1 Type Ljava/util/Calendar; At 48 87 Range 48 134 Init 48
    // LocalVar   7 added: Name l Type J At 131 16 Range 131 146 Init 131
    public static Time toTime(Connection connection, byte abyte0[], Calendar calendar)
        throws SQLException
    {
        int ai[] = new int[SIZE_TIMESTAMPLTZ];
        for(int i = 0; i < abyte0.length; i++)
        {
            ai[i] = abyte0[i] & 0xff;
        }

        int j = getJavaYear(ai[0], ai[1]);
        Calendar calendar1 = Calendar.getInstance();
        TimeZone.setDefault(calendar.getTimeZone());
        calendar.set(1, j);
        calendar.set(2, ai[2] - 1);
        calendar.set(5, ai[3]);
        calendar.set(11, ai[4] - 1);
        calendar.set(12, ai[5] - 1);
        calendar.set(13, ai[6] - 1);
        TimeZoneAdjust(connection, calendar, calendar1);
        long l = calendar1.getTime().getTime();
        TimeZone.setDefault(calendar1.getTimeZone());
        return new Time(l);
    }

    // Decompiling method: toTimestamp  Signature: (Ljava/sql/Connection;[B)Ljava/sql/Timestamp;
    // Max stack: 4, #locals: 15, #params: 2
    // Code length: 287 bytes, Code offset: 14679
    // Line Number Table found: 35 entries
    // Parameter  0 added: Name connection Type Ljava/sql/Connection; At 0 287 Range 0 286 Init 0
    // Parameter  1 added: Name abyte0 Type [B At 0 287 Range 0 286 Init 0
    // RetValue  15 added: Name <returnValue> Type Ljava/sql/Timestamp; At 0 287 Range 0 286 Init 0 fixed
    // LocalVar   2 added: Name ai Type [I At 5 262 Range 5 266 Init 5
    // LocalVar   3 added: Name flag Type Z At 7 18 Range 7 24 Init 7
    // LocalVar   3 chged: Name i Oname flag Type I At 24 1 Range 7 24 Init 7
    // LocalVar   4 added: Name timezone Type Ljava/util/TimeZone; At 33 173 Range 33 205 Init 33
    // LocalVar   5 added: Name obj Type A At 36 2 Range 36 37 Init 36
    // LocalVar   6 added: Name obj1 Type A At 39 2 Range 39 40 Init 39
    // LocalVar   5 added: Name oraclepreparedstatement Type Loracle/jdbc/OraclePreparedStatement; At 52 4 Range 52 55 Init 52
    // LocalVar   6 added: Name resultset Type Ljava/sql/ResultSet; At 61 12 Range 61 72 Init 61
    // LocalVar   7 added: Name s Type Ljava/lang/String; At 79 4 Range 79 82 Init 79
    // LocalVar   8 added: Name calendar Type Ljava/util/Calendar; At 86 103 Range 86 188 Init 86
    // LocalVar   9 added: Name calendar1 Type Ljava/util/Calendar; At 92 104 Range 92 195 Init 92
    // LocalVar  10 added: Name j Type I At 103 15 Range 103 117 Init 103
    // LocalVar  11 added: Name l Type J At 202 13 Range 202 214 Init 202
    // LocalVar  13 added: Name timestamp Type Ljava/sql/Timestamp; At 218 68 Range 218 285 Init 218
    // LocalVar  14 added: Name flag Type Z At 221 60 Range 221 280 Init 221
    // LocalVar  14 chged: Name k Oname flag Type I At 238 4 Range 221 280 Init 221
    // LocalVar   5 chged: Name oraclepreparedstatement1 Oname obj Type Loracle/jdbc/OraclePreparedStatement; At 36 2 Range 36 37 Init 36
    // LocalVar   5 name oraclepreparedstatement(Loracle/jdbc/OraclePreparedStatement;) merged out into oraclepreparedstatement1(Loracle/jdbc/OraclePreparedStatement;)
    // LocalVar   6 chged: Name resultset1 Oname obj1 Type Ljava/sql/ResultSet; At 39 2 Range 39 40 Init 39
    // LocalVar   6 name resultset(Ljava/sql/ResultSet;) merged out into resultset1(Ljava/sql/ResultSet;)
    public static Timestamp toTimestamp(Connection connection, byte abyte0[])
        throws SQLException
    {
        int ai[] = new int[SIZE_TIMESTAMPLTZ];
        for(int i = 0; i < abyte0.length; i++)
        {
            ai[i] = abyte0[i] & 0xff;
        }

        TimeZone timezone = TimeZone.getDefault();
        OraclePreparedStatement oraclepreparedstatement = null;
        ResultSet resultset = null;
        oraclepreparedstatement = (OraclePreparedStatement)connection.prepareStatement("SELECT DBTIMEZONE FROM DUAL");
        resultset = oraclepreparedstatement.executeQuery();
        resultset.next();
        String s = resultset.getString(1);
        Calendar calendar = getDbTzCalendar(s);
        Calendar calendar1 = getSessCalendar(connection);
        int j = getJavaYear(ai[0], ai[1]);
        TimeZone.setDefault(calendar.getTimeZone());
        calendar.set(1, j);
        calendar.set(2, ai[2] - 1);
        calendar.set(5, ai[3]);
        calendar.set(11, ai[4] - 1);
        calendar.set(12, ai[5] - 1);
        calendar.set(13, ai[6] - 1);
        calendar.set(14, 0);
        TimeZoneAdjust(connection, calendar, calendar1);
        long l = calendar1.getTime().getTime();
        TimeZone.setDefault(timezone);
        Timestamp timestamp = new Timestamp(l);
        int k = 0;
        if(abyte0.length == SIZE_TIMESTAMPLTZ)
        {
            k = ai[7] << 24;
            k |= ai[8] << 16;
            k |= ai[9] << 8;
            k |= ai[10] & 0xff;
        }
        timestamp.setNanos(k);
        return timestamp;
    }

    // Decompiling method: toTimestamp  Signature: (Ljava/sql/Connection;[BLjava/util/Calendar;)Ljava/sql/Timestamp;
    // Max stack: 4, #locals: 11, #params: 3
    // Code length: 226 bytes, Code offset: 15150
    // Line Number Table found: 26 entries
    // Parameter  0 added: Name connection Type Ljava/sql/Connection; At 0 226 Range 0 225 Init 0
    // Parameter  1 added: Name abyte0 Type [B At 0 226 Range 0 225 Init 0
    // Parameter  2 added: Name calendar Type Ljava/util/Calendar; At 0 226 Range 0 225 Init 0
    // RetValue  11 added: Name <returnValue> Type Ljava/sql/Timestamp; At 0 226 Range 0 225 Init 0 fixed
    // LocalVar   3 added: Name ai Type [I At 5 201 Range 5 205 Init 5
    // LocalVar   4 added: Name flag Type Z At 7 22 Range 7 28 Init 7
    // LocalVar   4 chged: Name i Oname flag Type I At 27 2 Range 7 28 Init 7
    // LocalVar   5 added: Name j Type I At 43 18 Range 43 60 Init 43
    // LocalVar   6 added: Name calendar1 Type Ljava/util/Calendar; At 48 94 Range 48 141 Init 48
    // LocalVar   7 added: Name l Type J At 138 16 Range 138 153 Init 138
    // LocalVar   9 added: Name timestamp Type Ljava/sql/Timestamp; At 157 68 Range 157 224 Init 157
    // LocalVar  10 added: Name flag Type Z At 160 60 Range 160 219 Init 160
    // LocalVar  10 chged: Name k Oname flag Type I At 177 4 Range 160 219 Init 160
    public static Timestamp toTimestamp(Connection connection, byte abyte0[], Calendar calendar)
        throws SQLException
    {
        int ai[] = new int[SIZE_TIMESTAMPLTZ];
        for(int i = 0; i < abyte0.length; i++)
        {
            ai[i] = abyte0[i] & 0xff;
        }

        int j = getJavaYear(ai[0], ai[1]);
        Calendar calendar1 = Calendar.getInstance();
        TimeZone.setDefault(calendar.getTimeZone());
        calendar.set(1, j);
        calendar.set(2, ai[2] - 1);
        calendar.set(5, ai[3]);
        calendar.set(11, ai[4] - 1);
        calendar.set(12, ai[5] - 1);
        calendar.set(13, ai[6] - 1);
        calendar.set(14, 0);
        TimeZoneAdjust(connection, calendar, calendar1);
        long l = calendar1.getTime().getTime();
        TimeZone.setDefault(calendar1.getTimeZone());
        Timestamp timestamp = new Timestamp(l);
        int k = 0;
        if(abyte0.length == SIZE_TIMESTAMPLTZ)
        {
            k = ai[7] << 24;
            k |= ai[8] << 16;
            k |= ai[9] << 8;
            k |= ai[10] & 0xff;
        }
        timestamp.setNanos(k);
        return timestamp;
    }

    // Decompiling method: <clinit>  Signature: ()V
    // Max stack: 1, #locals: 0, #params: 0
    // Code length: 59 bytes, Code offset: 6005
    // Line Number Table found: 13 entries
    // RetValue   0 added: Name <returnValue> Type V At 0 59 Range 0 58 Init 0 fixed
    static 
    {
        /* SIZE_TIMESTAMPLTZ = 11; */
        /* SIZE_DATE = 7; */
        /* CENTURY_DEFAULT = 119; */
        /* DECADE_DEFAULT = 100; */
        /* MONTH_DEFAULT = 1; */
        /* DAY_DEFAULT = 1; */
        /* DECADE_INIT = 170; */
        /* HOUR_MILLISECOND = 0x36ee80; */
        /* MINUTE_MILLISECOND = 60000; */
        /* JAVA_YEAR = 1970; */
        /* JAVA_MONTH = 0; */
        /* JAVA_DATE = 1; */
    }
}
