public class FormatUtils
extends java.lang.Object
FormatUtils is thread-safe and immutable.
Modifier and Type | Method and Description |
---|---|
static void |
appendPaddedInteger(java.lang.Appendable appenadble,
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 appendable.
|
static void |
appendPaddedInteger(java.lang.Appendable appendable,
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.
|
static void |
appendPaddedInteger(java.lang.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.
|
static void |
appendPaddedInteger(java.lang.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.
|
static void |
appendUnpaddedInteger(java.lang.Appendable appendable,
int value)
Converts an integer to a string, and appends it to the given appendable.
|
static void |
appendUnpaddedInteger(java.lang.Appendable appendable,
long value)
Converts an integer to a string, and appends it to the given appendable.
|
static void |
appendUnpaddedInteger(java.lang.StringBuffer buf,
int value)
Converts an integer to a string, and appends it to the given buffer.
|
static void |
appendUnpaddedInteger(java.lang.StringBuffer buf,
long value)
Converts an integer to a string, and appends it to the given buffer.
|
static int |
calculateDigitCount(long value)
Calculates the number of decimal digits for the given value,
including the sign.
|
static void |
writePaddedInteger(java.io.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.
|
static void |
writePaddedInteger(java.io.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.
|
static void |
writeUnpaddedInteger(java.io.Writer out,
int value)
Converts an integer to a string, and writes it to the given writer.
|
static void |
writeUnpaddedInteger(java.io.Writer out,
long value)
Converts an integer to a string, and writes it to the given writer.
|
public static void appendPaddedInteger(java.lang.StringBuffer buf, int value, int size)
This method is optimized for converting small values to strings.
buf
- receives integer converted to a stringvalue
- value to convert to a stringsize
- minimum amount of digits to appendpublic static void appendPaddedInteger(java.lang.Appendable appenadble, int value, int size) throws java.io.IOException
This method is optimized for converting small values to strings.
appenadble
- receives integer converted to a stringvalue
- value to convert to a stringsize
- minimum amount of digits to appendjava.io.IOException
public static void appendPaddedInteger(java.lang.StringBuffer buf, long value, int size)
This method is optimized for converting small values to strings.
buf
- receives integer converted to a stringvalue
- value to convert to a stringsize
- minimum amount of digits to appendpublic static void appendPaddedInteger(java.lang.Appendable appendable, long value, int size) throws java.io.IOException
This method is optimized for converting small values to strings.
appendable
- receives integer converted to a stringvalue
- value to convert to a stringsize
- minimum amount of digits to appendjava.io.IOException
public static void writePaddedInteger(java.io.Writer out, int value, int size) throws java.io.IOException
This method is optimized for converting small values to strings.
out
- receives integer converted to a stringvalue
- value to convert to a stringsize
- minimum amount of digits to appendjava.io.IOException
public static void writePaddedInteger(java.io.Writer out, long value, int size) throws java.io.IOException
This method is optimized for converting small values to strings.
out
- receives integer converted to a stringvalue
- value to convert to a stringsize
- minimum amount of digits to appendjava.io.IOException
public static void appendUnpaddedInteger(java.lang.StringBuffer buf, int value)
This method is optimized for converting small values to strings.
buf
- receives integer converted to a stringvalue
- value to convert to a stringpublic static void appendUnpaddedInteger(java.lang.Appendable appendable, int value) throws java.io.IOException
This method is optimized for converting small values to strings.
appendable
- receives integer converted to a stringvalue
- value to convert to a stringjava.io.IOException
public static void appendUnpaddedInteger(java.lang.StringBuffer buf, long value)
This method is optimized for converting small values to strings.
buf
- receives integer converted to a stringvalue
- value to convert to a stringpublic static void appendUnpaddedInteger(java.lang.Appendable appendable, long value) throws java.io.IOException
This method is optimized for converting small values to strings.
appendable
- receives integer converted to a stringvalue
- value to convert to a stringjava.io.IOException
public static void writeUnpaddedInteger(java.io.Writer out, int value) throws java.io.IOException
This method is optimized for converting small values to strings.
out
- receives integer converted to a stringvalue
- value to convert to a stringjava.io.IOException
public static void writeUnpaddedInteger(java.io.Writer out, long value) throws java.io.IOException
This method is optimized for converting small values to strings.
out
- receives integer converted to a stringvalue
- value to convert to a stringjava.io.IOException
public static int calculateDigitCount(long value)
Copyright © 2010 - 2020 Adobe. All Rights Reserved