// The value may be a Date if it comes from one of the
// methods that don't specify the calendar, or a
// DateTimeValue if it comes from a method that does
// specify the calendar. Convert to DateTimeValue if
// needed.
DateTimeValue dateVal = (inputs[i] instanceof Date) ?
new DateTimeValue((Date) inputs[i]) :
(DateTimeValue) inputs[i];
writeDate(dateVal);
break;
case DRDAConstants.DRDA_TYPE_NTIME:
// The value may be a Time if it comes from one of the
// methods that don't specify the calendar, or a
// DateTimeValue if it comes from a method that does
// specify the calendar. Convert to DateTimeValue if
// needed.
DateTimeValue timeVal = (inputs[i] instanceof Time) ?
new DateTimeValue((Time) inputs[i]) :
(DateTimeValue) inputs[i];
writeTime(timeVal);
break;
case DRDAConstants.DRDA_TYPE_NTIMESTAMP:
// The value may be a Timestamp if it comes from one of
// the methods that don't specify the calendar, or a
// DateTimeValue if it comes from a method that does
// specify the calendar. Convert to DateTimeValue if
// needed.
DateTimeValue tsVal = (inputs[i] instanceof Timestamp) ?
new DateTimeValue((Timestamp) inputs[i]) :
(DateTimeValue) inputs[i];
writeTimestamp(tsVal);
break;
case DRDAConstants.DRDA_TYPE_NINTEGER8:
writeLongFdocaData(((Long) inputs[i]).longValue());