db.out.writeOpaque(buffer, buffer.length);
db.out.writeOpaque(buffer, buffer.length);*/
    private void writeSQLDatum(isc_db_handle_impl db,                                  XSQLVAR xsqlvar) throws GDSException {        byte[] buffer;                try {            Object sqldata = xsqlvar.sqldata;            switch (xsqlvar.sqltype & ~1) {                case SQL_TEXT:                    buffer =                        fillString((String) sqldata, xsqlvar.sqllen).getBytes();                    db.out.writeOpaque(buffer, buffer.length);                    break;                case SQL_VARYING:                    int len = Math.min(((String) sqldata).length(),                                       xsqlvar.sqllen);                    db.out.writeInt(len);                    buffer = ((String) sqldata).substring(0, len).getBytes();                    db.out.writeOpaque(buffer, buffer.length);                    break;                case SQL_SHORT:                    db.out.writeInt(((Short) sqldata).shortValue());                    break;                case SQL_LONG:                    db.out.writeInt(((Integer) sqldata).intValue());                    break;                case SQL_FLOAT:                    db.out.writeFloat(((Float) sqldata).floatValue());                    break;                case SQL_DOUBLE:                    db.out.writeDouble(((Double) sqldata).doubleValue());                    break;//            case SQL_D_FLOAT://                break;                case SQL_TIMESTAMP:                    db.out.writeInt(encodeDate((java.sql.Timestamp) sqldata));                    db.out.writeInt(encodeTime((java.sql.Timestamp) sqldata));                    break;                case SQL_BLOB:                    db.out.writeLong(((Long) sqldata).longValue());                    break;                case SQL_ARRAY:                    db.out.writeLong(((Long) sqldata).longValue());                    break;                case SQL_QUAD:                    db.out.writeLong(((Long) sqldata).longValue());                    break;                case SQL_TYPE_TIME:                    db.out.writeInt(encodeTime((java.sql.Time) sqldata));                    break;                case SQL_TYPE_DATE:                    db.out.writeInt(encodeDate((java.sql.Date) sqldata));                    break;                case SQL_INT64:                    db.out.writeLong(((Long) sqldata).longValue());                    break;            }                        db.out.writeInt(xsqlvar.sqlind);                    } catch (IOException ex) {            throw new GDSException(isc_net_write_err);        }    }