com.realtime.xmpp.util
Class TimeWriter

java.lang.Object
  |
  +--com.realtime.xmpp.util.TimeWriter

public class TimeWriter
extends java.lang.Object

Helper class to generate time strings.

Version:
1.0 Copyright © 2002 Real Time Entertainment Group, LLC - All rights reserved.
Author:
Mike Prince

Field Summary
protected static java.util.Calendar m_calendar
          Calendar for generating time strings.
 
Constructor Summary
TimeWriter()
           
 
Method Summary
static java.lang.String getTime(long time)
          Create a string representation of the given time.
static java.lang.String getUTC(long time)
          Create a string representation of the given time as Jabber ready UTC.
static void writeTime(java.lang.StringBuffer buf, long time)
          Format the current time into a string.
static void writeUTC(java.lang.StringBuffer buf, long time)
          Format the current time into a Jabber UTC string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_calendar

protected static final java.util.Calendar m_calendar
Calendar for generating time strings.

Constructor Detail

TimeWriter

public TimeWriter()
Method Detail

getTime

public static java.lang.String getTime(long time)

Create a string representation of the given time.

* @param time The time as GMT milliseconds. * @return The time as a string.


writeTime

public static void writeTime(java.lang.StringBuffer buf,
                             long time)

Format the current time into a string. Append the result into a buffer.

Parameters:
buf - The string buffer to place the time into.
time - The time to generate as GMT milliseconds.

getUTC

public static java.lang.String getUTC(long time)

Create a string representation of the given time as Jabber ready UTC.

Parameters:
time - The time as GMT milliseconds.
Returns:
The time as a string.

writeUTC

public static void writeUTC(java.lang.StringBuffer buf,
                            long time)

Format the current time into a Jabber UTC string. Append the result into a buffer.

Parameters:
buf - The string buffer to place the time into.
time - The time to generate as GMT milliseconds.


Copyright © 2002,2003 Real Time Entertainment Group, LLC. All Rights Reserved.