Package org.apache.log4j.pattern
Class FormattingInfo
- java.lang.Object
-
- org.apache.log4j.pattern.FormattingInfo
-
public final class FormattingInfo extends Object
Modifies the output of a pattern converter for a specified minimum and maximum width and alignment.
-
-
Constructor Summary
Constructors Constructor Description FormattingInfo(boolean leftAlign, int minLength, int maxLength)Creates new instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidformat(int fieldStart, StringBuffer buffer)Adjust the content of the buffer based on the specified lengths and alignment.static FormattingInfogetDefault()Gets default instance.intgetMaxLength()Get maximum length.intgetMinLength()Get minimum length.booleanisLeftAligned()Determine if left aligned.
-
-
-
Method Detail
-
getDefault
public static FormattingInfo getDefault()
Gets default instance.- Returns:
- default instance.
-
format
public void format(int fieldStart, StringBuffer buffer)Adjust the content of the buffer based on the specified lengths and alignment.- Parameters:
fieldStart- start of field in buffer.buffer- buffer to be modified.
-
getMaxLength
public int getMaxLength()
Get maximum length.- Returns:
- maximum length.
-
getMinLength
public int getMinLength()
Get minimum length.- Returns:
- minimum length.
-
isLeftAligned
public boolean isLeftAligned()
Determine if left aligned.- Returns:
- true if left aligned.
-
-