public java.sql.Time getTime(int columnIndex, Calendar cal) throws SQLException {
      Object value;

      // sanity check.
      checkIndex(columnIndex);
      // make sure the cursor is on a valid row
      checkCursor();

      setLastValueNull(false);
      value = getCurrentRow().getColumnObject(columnIndex);

      // check for SQL NULL
      if (value == null) {
         setLastValueNull(true);
         return null;
      }

      value = convertTemporal(value,
          RowSetMD.getColumnType(columnIndex),
          java.sql.Types.TIME);

      // create a default calendar
      Calendar defaultCal = Calendar.getInstance();
      // set the time in the default calendar
      defaultCal.setTime((java.util.Date)value);

      /*
       * Now we can pull the pieces of the date out
       * of the default calendar and put them into
       * the user provided calendar
       */
      cal.set(Calendar.HOUR_OF_DAY, defaultCal.get(Calendar.HOUR_OF_DAY));
      cal.set(Calendar.MINUTE, defaultCal.get(Calendar.MINUTE));
      cal.set(Calendar.SECOND, defaultCal.get(Calendar.SECOND));

      return new java.sql.Time(cal.getTime().getTime());
   }
Retrieves the value of the designated column in the current row
of this <code>StreamingRowSetImpl</code> object as a <code>java.sql.Time</code>
object, using the given <code>Calendar</code> object to construct an
appropriate millisecond value for the date.

@param columnIndex the first column is <code>1</code>, the second
       is <code>2</code>, and so on; must be <code>1</code> or larger
       and equal to or less than the number of columns in the rowset
@param cal the <code>java.util.Calendar</code> object to use in
           constructing the date
@return the column value; if the value is SQL <code>NULL</code>,
        the result is <code>null</code>
@throws SQLException if (1) the given column name is not the name of
           a column in this rowset, (2) the cursor is not on one of
           this rowset's rows or its insert row, or (3) the designated
           column does not store an SQL <code>TIME</code> or
           <code>TIMESTAMP</code> value
src/main/java/org/replicadb/rowset/StreamingRowSetImpl.java