com.ice.cvsc
Class CVSTimestampFormat

java.lang.Object
  |
  +--java.text.Format
        |
        +--com.ice.cvsc.CVSTimestampFormat
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class CVSTimestampFormat
extends java.text.Format

The CVSTimestampFormat class implements the code necessary to format and parse CVS Entry timestamps, which come in the flavor of 'Wed Mar 4 1997 15:43:06'. NOTE This class explicitly operates entirely in the 'Locale.US' locality. Thus, this class is not useful for display purposes, since the values are not localized.

Version:
$Revision: 2.5 $
Author:
Timothy Gerard Endres, time@ice.com.
See Also:
CVSClient, CVSRequest, Serialized Form

Field Summary
static java.lang.String DEFAULT_GMT_TZID
           
static java.lang.String RCS_ID
           
static java.lang.String RCS_REV
           
 
Constructor Summary
CVSTimestampFormat()
           
 
Method Summary
 java.lang.String format(CVSTimestamp stamp)
           
 java.lang.StringBuffer format(java.lang.Object stamp, java.lang.StringBuffer appendTo, java.text.FieldPosition fieldPos)
           
 java.lang.String formatTerse(CVSTimestamp stamp)
           
 java.lang.String formatTerseTimeZone(CVSTimestamp stamp, java.util.TimeZone tz)
           
 java.lang.String formatTimeZone(CVSTimestamp stamp, java.util.TimeZone tz)
           
static CVSTimestampFormat getInstance()
           
static void main(java.lang.String[] args)
           
 CVSTimestamp parse(java.lang.String source)
           
 java.lang.Object parseObject(java.lang.String source, java.text.ParsePosition pos)
           
 CVSTimestamp parseTimestamp(java.lang.String source)
           
 CVSTimestamp parseTimestamp(java.lang.String source, java.text.ParsePosition pos)
           
static void setTimeZoneID(java.lang.String timezoneID)
           
 
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
 

Field Detail

RCS_ID

public static final java.lang.String RCS_ID
See Also:
Constant Field Values

RCS_REV

public static final java.lang.String RCS_REV
See Also:
Constant Field Values

DEFAULT_GMT_TZID

public static final java.lang.String DEFAULT_GMT_TZID
See Also:
Constant Field Values
Constructor Detail

CVSTimestampFormat

public CVSTimestampFormat()
Method Detail

getInstance

public static final CVSTimestampFormat getInstance()

setTimeZoneID

public static final void setTimeZoneID(java.lang.String timezoneID)

format

public java.lang.String format(CVSTimestamp stamp)
                        throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException

formatTimeZone

public java.lang.String formatTimeZone(CVSTimestamp stamp,
                                       java.util.TimeZone tz)
                                throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException

format

public java.lang.StringBuffer format(java.lang.Object stamp,
                                     java.lang.StringBuffer appendTo,
                                     java.text.FieldPosition fieldPos)
                              throws java.lang.IllegalArgumentException
Specified by:
format in class java.text.Format
java.lang.IllegalArgumentException

formatTerse

public java.lang.String formatTerse(CVSTimestamp stamp)

formatTerseTimeZone

public java.lang.String formatTerseTimeZone(CVSTimestamp stamp,
                                            java.util.TimeZone tz)

parse

public CVSTimestamp parse(java.lang.String source)
                   throws java.text.ParseException
java.text.ParseException

parseObject

public java.lang.Object parseObject(java.lang.String source,
                                    java.text.ParsePosition pos)
Specified by:
parseObject in class java.text.Format

parseTimestamp

public CVSTimestamp parseTimestamp(java.lang.String source)
                            throws java.text.ParseException
java.text.ParseException

parseTimestamp

public CVSTimestamp parseTimestamp(java.lang.String source,
                                   java.text.ParsePosition pos)
                            throws java.text.ParseException
java.text.ParseException

main

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


Copyright © 1997-2003, Timothy G. Endres, All Rights Reserved.