Java Doc for Utility.java in  » XML » jibx-1.1.5 » org » jibx » runtime » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » XML » jibx 1.1.5 » org.jibx.runtime 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jibx.runtime.Utility

Utility
abstract public class Utility (Code)
Utility class supplying static methods. Date serialization is based on the algorithms published by Peter Baum (http://www.capecod.net/~pbaum). All date handling is done according to the W3C Schema specification, which uses a proleptic Gregorian calendar with no year 0. Note that this differs from the Java date handling, which uses a discontinuous Gregorian calendar.
author:
   Dennis M. Sosnoski
version:
   1.0


Field Summary
final public static  intMINIMUM_GROWN_ARRAY_SIZE
     Minimum size for array returned by Utility.growArray .


Method Summary
public static  ListarrayListFactory()
     Factory method to create a java.util.ArrayList as the implementation of a java.util.List.
public static  byte[]deserializeBase64(String text)
     Parse base64 data from text.
public static  chardeserializeCharString(String text)
     Deserialize char value from text as character value.
public static  DatedeserializeDate(String text)
     Deserialize date from text.
public static  DatedeserializeDateTime(String text)
     Deserialize date from general dateTime text.
public static  ArrayListdeserializeList(String text, IListItemDeserializer ideser)
     Convert whitespace-separated list of values.
public static  java.sql.DatedeserializeSqlDate(String text)
     Deserialize SQL date from text.
public static  TimedeserializeSqlTime(String text)
     Deserialize time from text.
public static  TimestampdeserializeTimestamp(String text)
     Deserialize timestamp from general dateTime text.
public static  String[]deserializeTokenList(String text)
     Deserialize a list of whitespace-separated tokens into an array of strings.
public static  voidencodeChunk(int base, byte[] byts, StringBuffer buff)
     Encode a chunk of data to base64 encoding.
public static  intenumValue(String target, String[] enums, int[] vals)
     Find text value in enumeration.
protected static  voidformatTwoDigits(int value, StringBuffer buff)
     Format a positive number as two digits.
protected static  voidformatYear(long value, StringBuffer buff)
     Format time in milliseconds to year number.
protected static  longformatYearMonth(long value, StringBuffer buff)
     Format time in milliseconds to year number and month number.
protected static  intformatYearMonthDay(long value, StringBuffer buff)
     Format time in milliseconds to year number, month number, and day number.
protected static  voidformatYearNumber(long year, StringBuffer buff)
     Format year number consistent with W3C XML Schema definitions, using a minimum of four digits padded with zeros if necessary.
public static  ObjectgrowArray(Object base)
     Grow array of arbitrary type.
public static  booleanisEqual(Object a, Object b)
     General object comparison method.
public static  byte[]parseBase64(String text)
     Parse base64 data from text.
public static  booleanparseBoolean(String text)
     Parse boolean value from text.
public static  byteparseByte(String text)
     Parse byte value from text.
public static  charparseChar(String text)
     Parse char value from text as unsigned 16-bit integer.
public static  charparseCharString(String text)
     Parse char value from text as character value.
public static  longparseDate(String text)
     Convert date text to Java date.
public static  longparseDateTime(String text)
     Parse general dateTime value from text.
public static  doubleparseDouble(String text)
     Parse double value from text.
public static  floatparseFloat(String text)
     Parse float value from text.
public static  intparseInt(String text)
     Parse integer value from text.
public static  longparseLong(String text)
     Parse long value from text.
public static  shortparseShort(String text)
     Parse short value from text.
public static  longparseTime(String text, int start, int length)
     Parse general time value from text.
public static  longparseYear(String text)
     Convert gYear text to Java date.
public static  longparseYearMonth(String text)
     Convert gYearMonth text to Java date.
public static  ObjectresizeArray(int size, Object base)
     Resize array of arbitrary type.
public static  StringserializeBase64(byte[] byts)
     Serialize byte array to base64 text.
public static  StringserializeBoolean(boolean value)
     Serialize boolean value to text.
public static  StringserializeByte(byte value)
     Serialize byte value to text.
public static  StringserializeChar(char value)
     Serialize char value to text as unsigned 16-bit integer.
public static  StringserializeCharString(char value)
     Serialize char value to text as string of length one.
public static  StringserializeDate(long time)
     Serialize time to general date text.
public static  StringserializeDate(Date date)
     Serialize date to general date text.
public static  StringserializeDateTime(long time, boolean zone)
     Serialize time to general dateTime text.
public static  StringserializeDateTime(long time)
     Serialize time to general dateTime text.
public static  StringserializeDateTime(Date date)
     Serialize date to general dateTime text.
public static  StringserializeDouble(double value)
     Serialize double value to text.
public static  StringserializeFloat(float value)
     Serialize float value to text.
public static  StringserializeInt(int value)
     Serialize int value to text.
public static  StringserializeLong(long value)
     Serialize long value to text.
public static  StringserializeShort(short value)
     Serialize short value to text.
public static  StringserializeSqlDate(java.sql.Date date)
     Serialize SQL date to general date text.
public static  StringserializeSqlTime(Time time)
     Serialize time to standard text.
public static  voidserializeTime(int time, StringBuffer buff)
     Serialize time to general time text in buffer.
public static  StringserializeTimestamp(Timestamp stamp)
     Serialize timestamp to general dateTime text.
public static  StringserializeTokenList(String[] tokens)
     Serialize an array of strings into a whitespace-separated token list.
public static  StringserializeYear(long time)
     Serialize time to general gYear text.
public static  StringserializeYear(Date date)
     Serialize date to general gYear text.
public static  StringserializeYearMonth(long time)
     Serialize time to general gYearMonth text.
public static  StringserializeYearMonth(Date date)
     Serialize date to general gYearMonth text.

Field Detail
MINIMUM_GROWN_ARRAY_SIZE
final public static int MINIMUM_GROWN_ARRAY_SIZE(Code)
Minimum size for array returned by Utility.growArray .





Method Detail
arrayListFactory
public static List arrayListFactory()(Code)
Factory method to create a java.util.ArrayList as the implementation of a java.util.List. new java.util.ArrayList



deserializeBase64
public static byte[] deserializeBase64(String text) throws JiBXException(Code)
Parse base64 data from text. This converts the base64 data into a byte array of the appopriate length. In keeping with the recommendations,
Parameters:
  text - text to be parsed (may be null, or include extra characters) byte array of data
throws:
  JiBXException - if invalid character in base64 representation



deserializeCharString
public static char deserializeCharString(String text) throws JiBXException(Code)
Deserialize char value from text as character value. This requires that the string must be null or of length one.
Parameters:
  text - text to be parsed (may be null) converted char value
throws:
  JiBXException - on parse error



deserializeDate
public static Date deserializeDate(String text) throws JiBXException(Code)
Deserialize date from text. Date values are expected to match W3C XML Schema standard format as CCYY-MM-DD, with optional leading minus sign if necessary. This method follows standard JiBX deserializer usage requirements by accepting a null input.
Parameters:
  text - text to be parsed (may be null) converted date, or null if passed nullinput
throws:
  JiBXException - on parse error



deserializeDateTime
public static Date deserializeDateTime(String text) throws JiBXException(Code)
Deserialize date from general dateTime text. Date values are expected to match W3C XML Schema standard format as CCYY-MM-DDThh:mm:ss, with optional leading minus sign and trailing seconds decimal, as necessary. This method follows standard JiBX deserializer usage requirements by accepting a null input.
Parameters:
  text - text to be parsed (may be null) converted date, or null if passed nullinput
throws:
  JiBXException - on parse error



deserializeList
public static ArrayList deserializeList(String text, IListItemDeserializer ideser) throws JiBXException(Code)
Convert whitespace-separated list of values. This implements the whitespace skipping, calling the supplied item deserializer for handling each individual value.
Parameters:
  text - value to be converted
Parameters:
  ideser - list item deserializer list of deserialized items (null if inputnull, or if nonrecoverable error)
throws:
  JiBXException - if error in deserializing text



deserializeSqlDate
public static java.sql.Date deserializeSqlDate(String text) throws JiBXException(Code)
Deserialize SQL date from text. Date values are expected to match W3C XML Schema standard format as CCYY-MM-DD, with optional leading minus sign if necessary. This method follows standard JiBX deserializer usage requirements by accepting a null input.
Parameters:
  text - text to be parsed (may be null) converted date, or null if passed nullinput
throws:
  JiBXException - on parse error



deserializeSqlTime
public static Time deserializeSqlTime(String text) throws JiBXException(Code)
Deserialize time from text. Time values obey the rules of the time portion of a dataTime value. This method follows standard JiBX deserializer usage requirements by accepting a null input.
Parameters:
  text - text to be parsed (may be null) converted time, or null if passed nullinput
throws:
  JiBXException - on parse error



deserializeTimestamp
public static Timestamp deserializeTimestamp(String text) throws JiBXException(Code)
Deserialize timestamp from general dateTime text. Timestamp values are represented in the same way as regular dates, but allow more precision in the fractional second value (down to nanoseconds). This method follows standard JiBX deserializer usage requirements by accepting a null input.
Parameters:
  text - text to be parsed (may be null) converted timestamp, or null if passednull input
throws:
  JiBXException - on parse error



deserializeTokenList
public static String[] deserializeTokenList(String text) throws JiBXException(Code)
Deserialize a list of whitespace-separated tokens into an array of strings.
Parameters:
  text - value text created class instance
throws:
  JiBXException - on error in marshalling



encodeChunk
public static void encodeChunk(int base, byte[] byts, StringBuffer buff)(Code)
Encode a chunk of data to base64 encoding. Converts the next three bytes of data into four characters of text representation, using padding at the end of less than three bytes of data remain.
Parameters:
  base - starting offset within byte array
Parameters:
  byts - byte data array
Parameters:
  buff - buffer for encoded text



enumValue
public static int enumValue(String target, String[] enums, int[] vals) throws JiBXException(Code)
Find text value in enumeration. This first does a binary search through an array of allowed text matches. If a separate array of corresponding values is supplied, the value at the matched position is returned; otherwise the match index is returned directly.
Parameters:
  target - text to be found in enumeration
Parameters:
  enums - ordered array of texts included in enumeration
Parameters:
  vals - array of values to be returned for corresponding text matchpositions (position returned directly if this is null) enumeration value for target text
throws:
  JiBXException - if target text not found in enumeration



formatTwoDigits
protected static void formatTwoDigits(int value, StringBuffer buff)(Code)
Format a positive number as two digits. This uses an optional leading zero digit for values less than ten.
Parameters:
  value - number to be formatted (0 to 99)
Parameters:
  buff - text formatting buffer



formatYear
protected static void formatYear(long value, StringBuffer buff)(Code)
Format time in milliseconds to year number. The resulting year number format is consistent with W3C XML Schema definitions, using a minimum of four digits padded with zeros if necessary. A leading minus sign is included for years prior to 1 C.E.
Parameters:
  value - time in milliseconds to be converted (from 1 C.E.)
Parameters:
  buff - text formatting buffer



formatYearMonth
protected static long formatYearMonth(long value, StringBuffer buff)(Code)
Format time in milliseconds to year number and month number. The resulting year number format is consistent with W3C XML Schema definitions, using a minimum of four digits for the year and exactly two digits for the month.
Parameters:
  value - time in milliseconds to be converted (from 1 C.E.)
Parameters:
  buff - text formatting buffer number of milliseconds into month



formatYearMonthDay
protected static int formatYearMonthDay(long value, StringBuffer buff)(Code)
Format time in milliseconds to year number, month number, and day number. The resulting year number format is consistent with W3C XML Schema definitions, using a minimum of four digits for the year and exactly two digits each for the month and day.
Parameters:
  value - time in milliseconds to be converted (from 1 C.E.)
Parameters:
  buff - text formatting buffer number of milliseconds into day



formatYearNumber
protected static void formatYearNumber(long year, StringBuffer buff)(Code)
Format year number consistent with W3C XML Schema definitions, using a minimum of four digits padded with zeros if necessary. A leading minus sign is included for years prior to 1 C.E.
Parameters:
  year - number to be formatted
Parameters:
  buff - text formatting buffer



growArray
public static Object growArray(Object base)(Code)
Grow array of arbitrary type. The returned array is double the size of the original array, providing this is at least the defined minimum size.
Parameters:
  base - array to be grown array of twice the size as original array, with all data copied



isEqual
public static boolean isEqual(Object a, Object b)(Code)
General object comparison method. Don't know why Sun hasn't seen fit to include this somewhere, but at least it's easy to write (over and over again).
Parameters:
  a - first object to be compared
Parameters:
  b - second object to be compared true if both objects are null, or ifa.equals(b); false otherwise



parseBase64
public static byte[] parseBase64(String text) throws JiBXException(Code)
Parse base64 data from text. This converts the base64 data into a byte array of the appopriate length. In keeping with the recommendations,
Parameters:
  text - text to be parsed (may include extra characters) byte array of data
throws:
  JiBXException - if invalid character in base64 representation



parseBoolean
public static boolean parseBoolean(String text) throws JiBXException(Code)
Parse boolean value from text. Boolean values are parsed as either text "true" and "false", or "1" and "0" numeric equivalents.
Parameters:
  text - text to be parsed converted boolean value
throws:
  JiBXException - on parse error



parseByte
public static byte parseByte(String text) throws JiBXException(Code)
Parse byte value from text. Byte values are parsed with optional leading sign flag, followed by any number of digits.
Parameters:
  text - text to be parsed converted byte value
throws:
  JiBXException - on parse error



parseChar
public static char parseChar(String text) throws JiBXException(Code)
Parse char value from text as unsigned 16-bit integer. Char values are parsed with optional leading sign flag, followed by any number of digits.
Parameters:
  text - text to be parsed converted char value
throws:
  JiBXException - on parse error



parseCharString
public static char parseCharString(String text) throws JiBXException(Code)
Parse char value from text as character value. This requires that the string must be of length one.
Parameters:
  text - text to be parsed converted char value
throws:
  JiBXException - on parse error



parseDate
public static long parseDate(String text) throws JiBXException(Code)
Convert date text to Java date. Date values are expected to be in W3C XML Schema standard format as CCYY-MM-DD, with optional leading sign and trailing time zone (though the time zone is ignored in this case).
Parameters:
  text - text to be parsed start of day in month and year date as millisecond value
throws:
  JiBXException - on parse error



parseDateTime
public static long parseDateTime(String text) throws JiBXException(Code)
Parse general dateTime value from text. Date values are expected to be in W3C XML Schema standard format as CCYY-MM-DDThh:mm:ss.fff, with optional leading sign and trailing time zone.
Parameters:
  text - text to be parsed converted date as millisecond value
throws:
  JiBXException - on parse error



parseDouble
public static double parseDouble(String text) throws JiBXException(Code)
Parse double value from text. This uses the W3C XML Schema format for doubles, with the exception that it will accept "+NaN" and "-NaN" as valid formats. This is not in strict compliance with the specification, but is included for interoperability with other Java XML processing.
Parameters:
  text - text to be parsed converted double value
throws:
  JiBXException - on parse error



parseFloat
public static float parseFloat(String text) throws JiBXException(Code)
Parse float value from text. This uses the W3C XML Schema format for floats, with the exception that it will accept "+NaN" and "-NaN" as valid formats. This is not in strict compliance with the specification, but is included for interoperability with other Java XML processing.
Parameters:
  text - text to be parsed converted float value
throws:
  JiBXException - on parse error



parseInt
public static int parseInt(String text) throws JiBXException(Code)
Parse integer value from text. Integer values are parsed with optional leading sign flag, followed by any number of digits.
Parameters:
  text - text to be parsed converted integer value
throws:
  JiBXException - on parse error



parseLong
public static long parseLong(String text) throws JiBXException(Code)
Parse long value from text. Long values are parsed with optional leading sign flag, followed by any number of digits.
Parameters:
  text - text to be parsed converted long value
throws:
  JiBXException - on parse error



parseShort
public static short parseShort(String text) throws JiBXException(Code)
Parse short value from text. Short values are parsed with optional leading sign flag, followed by any number of digits.
Parameters:
  text - text to be parsed converted short value
throws:
  JiBXException - on parse error



parseTime
public static long parseTime(String text, int start, int length) throws JiBXException(Code)
Parse general time value from text. Time values are expected to be in W3C XML Schema standard format as hh:mm:ss.fff, with optional leading sign and trailing time zone.
Parameters:
  text - text to be parsed
Parameters:
  start - offset of first character of time value
Parameters:
  length - number of characters in time value converted time as millisecond value
throws:
  JiBXException - on parse error



parseYear
public static long parseYear(String text) throws JiBXException(Code)
Convert gYear text to Java date. Date values are expected to be in W3C XML Schema standard format as CCYY, with optional leading sign.
Parameters:
  text - text to be parsed start of year date as millisecond value from 1 C.E.
throws:
  JiBXException - on parse error



parseYearMonth
public static long parseYearMonth(String text) throws JiBXException(Code)
Convert gYearMonth text to Java date. Date values are expected to be in W3C XML Schema standard format as CCYY-MM, with optional leading sign.
Parameters:
  text - text to be parsed start of month in year date as millisecond value
throws:
  JiBXException - on parse error



resizeArray
public static Object resizeArray(int size, Object base)(Code)
Resize array of arbitrary type.
Parameters:
  size - new aray size
Parameters:
  base - array to be resized resized array, with all data to minimum of the two sizes copied



serializeBase64
public static String serializeBase64(byte[] byts)(Code)
Serialize byte array to base64 text. In keeping with the specification, this adds a line break every 76 characters in the encoded representation.
Parameters:
  byts - byte data array base64 encoded text



serializeBoolean
public static String serializeBoolean(boolean value)(Code)
Serialize boolean value to text. This serializes the value using the text representation as "true" or "false".
Parameters:
  value - boolean value to be serialized text representation of value



serializeByte
public static String serializeByte(byte value)(Code)
Serialize byte value to text.
Parameters:
  value - byte value to be serialized text representation of value



serializeChar
public static String serializeChar(char value)(Code)
Serialize char value to text as unsigned 16-bit integer.
Parameters:
  value - char value to be serialized text representation of value



serializeCharString
public static String serializeCharString(char value)(Code)
Serialize char value to text as string of length one.
Parameters:
  value - char value to be serialized text representation of value



serializeDate
public static String serializeDate(long time)(Code)
Serialize time to general date text. Date values are formatted in W3C XML Schema standard format as CCYY-MM-DD, with optional leading sign included if necessary.
Parameters:
  time - time to be converted, as milliseconds from January 1, 1970 converted date text



serializeDate
public static String serializeDate(Date date)(Code)
Serialize date to general date text. Date values are formatted in W3C XML Schema standard format as CCYY-MM-DD, with optional leading sign included if necessary.
Parameters:
  date - date to be converted converted date text



serializeDateTime
public static String serializeDateTime(long time, boolean zone)(Code)
Serialize time to general dateTime text. Date values are formatted in W3C XML Schema standard format as CCYY-MM-DDThh:mm:ss, with optional leading sign and trailing seconds decimal, as necessary.
Parameters:
  time - time to be converted, as milliseconds from January 1, 1970
Parameters:
  zone - flag for trailing 'Z' to be appended to indicate UTC converted dateTime text



serializeDateTime
public static String serializeDateTime(long time)(Code)
Serialize time to general dateTime text. This method is provided for backward compatibility. It generates the dateTime text without the trailing 'Z' to indicate UTC.
Parameters:
  time - time to be converted, as milliseconds from January 1, 1970 converted dateTime text



serializeDateTime
public static String serializeDateTime(Date date)(Code)
Serialize date to general dateTime text. Date values are formatted in W3C XML Schema standard format as CCYY-MM-DDThh:mm:ssZ, with optional leading sign and trailing seconds decimal, as necessary.
Parameters:
  date - date to be converted converted dateTime text



serializeDouble
public static String serializeDouble(double value)(Code)
Serialize double value to text.
Parameters:
  value - double value to be serialized text representation of value



serializeFloat
public static String serializeFloat(float value)(Code)
Serialize float value to text.
Parameters:
  value - float value to be serialized text representation of value



serializeInt
public static String serializeInt(int value)(Code)
Serialize int value to text.
Parameters:
  value - int value to be serialized text representation of value



serializeLong
public static String serializeLong(long value)(Code)
Serialize long value to text.
Parameters:
  value - long value to be serialized text representation of value



serializeShort
public static String serializeShort(short value)(Code)
Serialize short value to text.
Parameters:
  value - short value to be serialized text representation of value



serializeSqlDate
public static String serializeSqlDate(java.sql.Date date)(Code)
Serialize SQL date to general date text. Date values are formatted in W3C XML Schema standard format as CCYY-MM-DD, with optional leading sign included if necessary.
Parameters:
  date - date to be converted converted date text



serializeSqlTime
public static String serializeSqlTime(Time time)(Code)
Serialize time to standard text. Time values are formatted in W3C XML Schema standard format as hh:mm:ss, with optional trailing seconds decimal, as necessary. The standard conversion does not append a time zone indication.
Parameters:
  time - time to be converted converted time text



serializeTime
public static void serializeTime(int time, StringBuffer buff)(Code)
Serialize time to general time text in buffer. Time values are formatted in W3C XML Schema standard format as hh:mm:ss, with optional trailing seconds decimal, as necessary. This form uses a supplied buffer to support flexible use, including with dateTime combination values.
Parameters:
  time - time to be converted, as milliseconds in day
Parameters:
  buff - buffer for appending time text



serializeTimestamp
public static String serializeTimestamp(Timestamp stamp)(Code)
Serialize timestamp to general dateTime text. Timestamp values are represented in the same way as regular dates, but allow more precision in the fractional second value (down to nanoseconds).
Parameters:
  stamp - timestamp to be converted converted dateTime text



serializeTokenList
public static String serializeTokenList(String[] tokens)(Code)
Serialize an array of strings into a whitespace-separated token list.
Parameters:
  tokens - array of strings to be serialized list text



serializeYear
public static String serializeYear(long time)(Code)
Serialize time to general gYear text. Date values are formatted in W3C XML Schema standard format as CCYY, with optional leading sign included if necessary.
Parameters:
  time - time to be converted, as milliseconds from January 1, 1970 converted gYear text



serializeYear
public static String serializeYear(Date date)(Code)
Serialize date to general gYear text. Date values are formatted in W3C XML Schema standard format as CCYY, with optional leading sign included if necessary.
Parameters:
  date - date to be converted converted gYear text



serializeYearMonth
public static String serializeYearMonth(long time)(Code)
Serialize time to general gYearMonth text. Date values are formatted in W3C XML Schema standard format as CCYY-MM, with optional leading sign included if necessary.
Parameters:
  time - time to be converted, as milliseconds from January 1, 1970 converted gYearMonth text



serializeYearMonth
public static String serializeYearMonth(Date date)(Code)
Serialize date to general gYearMonth text. Date values are formatted in W3C XML Schema standard format as CCYY-MM, with optional leading sign included if necessary.
Parameters:
  date - date to be converted converted gYearMonth text



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.