public static Time valueOf(String s) {
        int hour;
        int minute;
        int second;
        int firstColon;
        int secondColon;

        if (s == null) throw new java.lang.IllegalArgumentException();

        firstColon = s.indexOf(':');
        secondColon = s.indexOf(':', firstColon+1);
        if ((firstColon > 0) & (secondColon > 0) &
            (secondColon < s.length()-1)) {
            hour = Integer.parseInt(s.substring(0, firstColon));
            minute =
                Integer.parseInt(s.substring(firstColon+1, secondColon));
            second = Integer.parseInt(s.substring(secondColon+1));
        } else {
            throw new java.lang.IllegalArgumentException();
        }

        return new Time(hour, minute, second);
    }
public static Time valueOf ( String s ) { int hour ; int minute ; int second ; int firstColon ; int secondColon ; if ( s == null ) throw new java . lang . IllegalArgumentException ( ) ; firstColon = s . indexOf ( ':' ) ; secondColon = s . indexOf ( ':' , firstColon + 1 ) ; if ( ( firstColon > 0 ) & ( secondColon > 0 ) & ( secondColon < s . length ( ) - 1 ) ) { hour = Integer . parseInt ( s . substring ( 0 , firstColon ) ) ; minute = Integer . parseInt ( s . substring ( firstColon + 1 , secondColon ) ) ; second = Integer . parseInt ( s . substring ( secondColon + 1 ) ) ; } else { throw new java . lang . IllegalArgumentException ( ) ; } return new Time ( hour , minute , second ) ; }
Converts a string in JDBC time escape format to a <code>Time</code> value.

@param s time in format "hh:mm:ss"
@return a corresponding <code>Time</code> object