org.apache.camel.dataformat.bindy.format
Class DatePatternFormat

java.lang.Object
  extended by org.apache.camel.dataformat.bindy.format.DatePatternFormat
All Implemented Interfaces:
Format<Date>, PatternFormat<Date>

public class DatePatternFormat
extends Object
implements PatternFormat<Date>


Constructor Summary
DatePatternFormat()
           
DatePatternFormat(String pattern, Locale locale)
           
 
Method Summary
 String format(Date object)
          Formats the object into a String
protected  DateFormat getDateFormat()
           
 String getPattern()
          Method used to retrieve the pattern for the format
 Date parse(String string)
          Parses a String into an object
 void setPattern(String pattern)
          Sets the pattern
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatePatternFormat

public DatePatternFormat()

DatePatternFormat

public DatePatternFormat(String pattern,
                         Locale locale)
Method Detail

format

public String format(Date object)
              throws Exception
Description copied from interface: Format
Formats the object into a String

Specified by:
format in interface Format<Date>
Parameters:
object - the object
Returns:
formatted as a String
Throws:
Exception - can be thrown

parse

public Date parse(String string)
           throws Exception
Description copied from interface: Format
Parses a String into an object

Specified by:
parse in interface Format<Date>
Parameters:
string - the string
Returns:
T the object
Throws:
Exception - can be thrown

getDateFormat

protected DateFormat getDateFormat()

getPattern

public String getPattern()
Description copied from interface: PatternFormat
Method used to retrieve the pattern for the format

Specified by:
getPattern in interface PatternFormat<Date>
Returns:
String the pattern

setPattern

public void setPattern(String pattern)
Sets the pattern

Parameters:
pattern - the pattern


Apache CAMEL