| java.lang.Object org.joda.time.format.FormatUtils
FormatUtils | public class FormatUtils (Code) | | Utility methods used by formatters.
FormatUtils is thread-safe and immutable.
author: Brian S O'Neill since: 1.0 |
Method Summary | |
public static void | appendPaddedInteger(StringBuffer buf, int value, int size) Converts an integer to a string, prepended with a variable amount of '0'
pad characters, and appends it to the given buffer. | public static void | appendPaddedInteger(StringBuffer buf, long value, int size) Converts an integer to a string, prepended with a variable amount of '0'
pad characters, and appends it to the given buffer. | public static void | appendUnpaddedInteger(StringBuffer buf, int value) Converts an integer to a string, and appends it to the given buffer. | public static void | appendUnpaddedInteger(StringBuffer buf, long value) Converts an integer to a string, and appends it to the given buffer. | public static int | calculateDigitCount(long value) Calculates the number of decimal digits for the given value,
including the sign. | static String | createErrorMessage(String text, int errorPos) | static int | parseTwoDigits(String text, int position) | public static void | writePaddedInteger(Writer out, int value, int size) Converts an integer to a string, prepended with a variable amount of '0'
pad characters, and writes it to the given writer. | public static void | writePaddedInteger(Writer out, long value, int size) Converts an integer to a string, prepended with a variable amount of '0'
pad characters, and writes it to the given writer. | public static void | writeUnpaddedInteger(Writer out, int value) Converts an integer to a string, and writes it to the given writer. | public static void | writeUnpaddedInteger(Writer out, long value) Converts an integer to a string, and writes it to the given writer. |
appendPaddedInteger | public static void appendPaddedInteger(StringBuffer buf, int value, int size)(Code) | | Converts an integer to a string, prepended with a variable amount of '0'
pad characters, and appends it to the given buffer.
This method is optimized for converting small values to strings.
Parameters: buf - receives integer converted to a string Parameters: value - value to convert to a string Parameters: size - minumum amount of digits to append |
appendPaddedInteger | public static void appendPaddedInteger(StringBuffer buf, long value, int size)(Code) | | Converts an integer to a string, prepended with a variable amount of '0'
pad characters, and appends it to the given buffer.
This method is optimized for converting small values to strings.
Parameters: buf - receives integer converted to a string Parameters: value - value to convert to a string Parameters: size - minumum amount of digits to append |
appendUnpaddedInteger | public static void appendUnpaddedInteger(StringBuffer buf, int value)(Code) | | Converts an integer to a string, and appends it to the given buffer.
This method is optimized for converting small values to strings.
Parameters: buf - receives integer converted to a string Parameters: value - value to convert to a string |
appendUnpaddedInteger | public static void appendUnpaddedInteger(StringBuffer buf, long value)(Code) | | Converts an integer to a string, and appends it to the given buffer.
This method is optimized for converting small values to strings.
Parameters: buf - receives integer converted to a string Parameters: value - value to convert to a string |
calculateDigitCount | public static int calculateDigitCount(long value)(Code) | | Calculates the number of decimal digits for the given value,
including the sign.
|
parseTwoDigits | static int parseTwoDigits(String text, int position)(Code) | | |
writePaddedInteger | public static void writePaddedInteger(Writer out, int value, int size) throws IOException(Code) | | Converts an integer to a string, prepended with a variable amount of '0'
pad characters, and writes it to the given writer.
This method is optimized for converting small values to strings.
Parameters: out - receives integer converted to a string Parameters: value - value to convert to a string Parameters: size - minumum amount of digits to append |
writePaddedInteger | public static void writePaddedInteger(Writer out, long value, int size) throws IOException(Code) | | Converts an integer to a string, prepended with a variable amount of '0'
pad characters, and writes it to the given writer.
This method is optimized for converting small values to strings.
Parameters: out - receives integer converted to a string Parameters: value - value to convert to a string Parameters: size - minumum amount of digits to append |
writeUnpaddedInteger | public static void writeUnpaddedInteger(Writer out, int value) throws IOException(Code) | | Converts an integer to a string, and writes it to the given writer.
This method is optimized for converting small values to strings.
Parameters: out - receives integer converted to a string Parameters: value - value to convert to a string |
writeUnpaddedInteger | public static void writeUnpaddedInteger(Writer out, long value) throws IOException(Code) | | Converts an integer to a string, and writes it to the given writer.
This method is optimized for converting small values to strings.
Parameters: out - receives integer converted to a string Parameters: value - value to convert to a string |
|
|