|
Jive Forums API (5.5.20.2-oracle) Developer Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jivesoftware.forum.nntp.NNTPDate
public class NNTPDate
Reads and writes NNTP standard dates. This utility class provides several mechanisms for reading, writing, and manipulating NNTP dates in the Java language. There are several standard NNTP date formats floating around. Since we are the server and control all dates, we will stick with the standard outlook date format which uses UTC offset. As an added bonus, this format also follows Java standard timezone format.
Constructor Summary | |
---|---|
NNTPDate(java.util.Date newDate)
Create a new date using the given Java java.util.Date class. |
Method Summary | |
---|---|
static NNTPDate |
parseDate(java.lang.String dateString)
Parse a date from the given NNTP string representation. |
static NNTPDate |
parseDateTimeDist(java.lang.String[] cmdParts,
int index,
NewsGroupFilter filter)
Parse a date as it appears on an NNTP command line or header field. |
static NNTPDate |
parseGMTDate(java.lang.String dateString)
Parse a date from the given GMT NNTP string representation. |
java.util.Date |
toDate()
Converts the date to a Java Date class. |
java.lang.String |
toString()
Converts this date into it's standard NNTP String representation |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NNTPDate(java.util.Date newDate)
newDate
- the date this date should use.Method Detail |
---|
public static NNTPDate parseDate(java.lang.String dateString) throws SyntaxException
dateString
- the date string to parse.
SyntaxException
- if the date does not follow a recognized format.public static NNTPDate parseGMTDate(java.lang.String dateString) throws SyntaxException
dateString
- the date string to parse
SyntaxException
- if the date does not follow a recognized formatpublic static NNTPDate parseDateTimeDist(java.lang.String[] cmdParts, int index, NewsGroupFilter filter) throws SyntaxException
cmdParts
- an array of strings containing the date split along whitespace.index
- the index in the cmdParts array that the date begins.filter
- the group filter to add any trailing group distributions to.
SyntaxException
- if the string does not match a known NNTP date format.public java.util.Date toDate()
public java.lang.String toString()
toString
in class java.lang.Object
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |