Package io.zerocopy.json.schema.format
Class RFC3339Converter
- java.lang.Object
-
- io.zerocopy.json.schema.format.AbstractDateTimeConverter
-
- io.zerocopy.json.schema.format.RFC3339Converter
-
- All Implemented Interfaces:
DateTimeConverter
public class RFC3339Converter extends AbstractDateTimeConverter
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRFC3339Converter.Format
-
Field Summary
Fields Modifier and Type Field Description protected RFC3339Converter.Formatformat
-
Constructor Summary
Constructors Constructor Description RFC3339Converter(RFC3339Converter.Format format)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidformat(java.lang.Appendable out, java.util.Date date, int offset)Prints a date with a specified offsetRFC3339Converter.FormatgetFormat()java.util.Dateparse(java.lang.String source)static java.util.DateparseRFC3339Date(java.lang.String source, RFC3339Converter.Format format)static voidprintRFC3339Date(java.lang.Appendable out, java.util.Date date, RFC3339Converter.Format format, int offset)
-
-
-
Field Detail
-
format
protected final RFC3339Converter.Format format
-
-
Constructor Detail
-
RFC3339Converter
public RFC3339Converter(RFC3339Converter.Format format)
-
-
Method Detail
-
getFormat
public RFC3339Converter.Format getFormat()
-
parse
public java.util.Date parse(java.lang.String source)
-
format
public void format(java.lang.Appendable out, java.util.Date date, int offset) throws java.io.IOExceptionDescription copied from interface:DateTimeConverterPrints a date with a specified offset- Parameters:
out- print destinationdate- the date to printoffset- the timezone offset in [ms], with which the date shall be printed. Must be a multiple of 60000- Throws:
java.io.IOException- when a print operation fails
-
parseRFC3339Date
public static java.util.Date parseRFC3339Date(java.lang.String source, RFC3339Converter.Format format)
-
printRFC3339Date
public static void printRFC3339Date(java.lang.Appendable out, java.util.Date date, RFC3339Converter.Format format, int offset) throws java.io.IOException- Parameters:
out- print destinationdate- the date to printformat- the date/time formatoffset- the timezone offset [ms]- Throws:
java.io.IOException- when a print operation fails
-
-