public java.sql.Time getTime(int columnIndex) 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;
      }

      /*
       * The object coming back from the db could be
       * a date, a timestamp, or a char field variety.
       * If it's a date type return it, a timestamp
       * we turn into a long and then into a date,
       * char strings we try to parse. Yuck.
       */
      switch (RowSetMD.getColumnType(columnIndex)) {
         case java.sql.Types.TIME: {
            return (java.sql.Time)value;
         }
         case java.sql.Types.TIMESTAMP: {
            long sec = ((java.sql.Timestamp)value).getTime();
            return new java.sql.Time(sec);
         }
         case java.sql.Types.CHAR:
         case java.sql.Types.VARCHAR:
         case java.sql.Types.LONGVARCHAR: {
            try {
               DateFormat tf = DateFormat.getTimeInstance();
               return ((java.sql.Time)(tf.parse(value.toString())));
            } catch (ParseException ex) {
               throw new SQLException(MessageFormat.format(resBundle.handleGetObject("cachedrowsetimpl.timefail").toString(),
                   new Object[] {value.toString().trim(), columnIndex}));
            }
         }
         default: {
            throw new SQLException(MessageFormat.format(resBundle.handleGetObject("cachedrowsetimpl.timefail").toString(),
                new Object[] {value.toString().trim(), columnIndex}));
         }
      }
   }
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.

@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
@return the column value; if the value is SQL <code>NULL</code>, the
        result is <code>null</code>
@throws SQLException if the given column index is out of bounds,
        the cursor is not on a valid row, or this method fails
src/main/java/org/replicadb/rowset/StreamingRowSetImpl.java