Package ipsk.text

Class TimeFormat

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    public class TimeFormat
    extends java.text.Format
    Formats a string for multimedia time representation.
    Author:
    K.Jaensch, klausj@phonetik.uni-muenchen.de
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.text.Format

        java.text.Format.Field
    • Constructor Summary

      Constructors 
      Constructor Description
      TimeFormat​(int unit, java.lang.String pattern)
      Creates a new media time formatter.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.StringBuffer format​(java.lang.Object arg0, java.lang.StringBuffer arg1, java.text.FieldPosition arg2)  
      static void main​(java.lang.String[] args)  
      java.lang.Object parseObject​(java.lang.String timeStr, java.text.ParsePosition parsePosition)
      Parses a string in hh:mm:ss.mmm format.
      • Methods inherited from class java.text.Format

        clone, format, formatToCharacterIterator, parseObject
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TimeFormat

        public TimeFormat​(int unit,
                          java.lang.String pattern)
        Creates a new media time formatter.
    • Method Detail

      • parseObject

        public java.lang.Object parseObject​(java.lang.String timeStr,
                                            java.text.ParsePosition parsePosition)
        Parses a string in hh:mm:ss.mmm format.
        Specified by:
        parseObject in class java.text.Format
        Parameters:
        timeStr - the string to parse
        parsePosition - the current parsing position
        Returns:
        a Double object with the time value in nanoseconds or null if an parse error occurred
        See Also:
        Format.parseObject(java.lang.String, java.text.ParsePosition)
      • format

        public java.lang.StringBuffer format​(java.lang.Object arg0,
                                             java.lang.StringBuffer arg1,
                                             java.text.FieldPosition arg2)
        Specified by:
        format in class java.text.Format
      • main

        public static void main​(java.lang.String[] args)