SimpleFormatter

Inheritance: java.lang.Object, com.aspose.email.Formatter

public final class SimpleFormatter extends Formatter

Represents the default implementation of IFormatter interface.

Constructors

Constructor Description
SimpleFormatter() Creates a new SimpleFormatter instance.
SimpleFormatter(String header, String footer) Creates a new SimpleFormatter instance.

Methods

Method Description
format(LogEntry entry) Formats a log entry and return a string to be outputted.
format(Date datatime) Formats a datetime and return a string to be outputted.

SimpleFormatter()

public SimpleFormatter()

Creates a new SimpleFormatter instance.

SimpleFormatter(String header, String footer)

public SimpleFormatter(String header, String footer)

Creates a new SimpleFormatter instance.

Parameters:

Parameter Type Description
header java.lang.String The header.
footer java.lang.String The footer.

format(LogEntry entry)

public String format(LogEntry entry)

Formats a log entry and return a string to be outputted.

Parameters:

Parameter Type Description
entry LogEntry Log entry to format.

Returns: java.lang.String - String representing the log entry.

format(Date datatime)

public String format(Date datatime)

Formats a datetime and return a string to be outputted.

Parameters:

Parameter Type Description
datatime java.util.Date The datetime value for formatting to string

Returns: java.lang.String