|
PTLog API - 1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjp.ne.dti.lares.foozy.ptlog.format.DefaultByteFormatter
Default implementation.
This uses Integer#toString(int value, int radix),
which is used invoked from Byte#toString in fact,
to format specified value.
| Field Summary | |
static DefaultByteFormatter |
S_DEC
For convenience to format decimal radix as signed byte. |
static DefaultByteFormatter |
S_HEX
For convenience to format hexadecimal radix as signed byte. |
static DefaultByteFormatter |
S_OCT
For convenience to format in octal radix as signed byte. |
static DefaultByteFormatter |
U_DEC
For convenience to format decimal radix as unsigned byte. |
static DefaultByteFormatter |
U_HEX
For convenience to format hexadecimal radix as unsigned byte. |
static DefaultByteFormatter |
U_OCT
For convenience to format in octal radix as unsigned byte. |
| Constructor Summary | |
DefaultByteFormatter(int radix,
boolean useSign)
Constructor. |
|
| Method Summary | |
java.lang.String |
format(byte value)
Format specified value. |
java.lang.String |
format(java.lang.Byte value)
Format specified value. |
ObjectFormatter |
forObject()
Get object which adapts "this" to ObjectFormatter.
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final DefaultByteFormatter S_OCT
This returns "-1" for 0xFF.
public static final DefaultByteFormatter U_OCT
This returns "377" for 0xFF.
public static final DefaultByteFormatter S_DEC
This returns "-1" for 0xFF.
public static final DefaultByteFormatter U_DEC
This returns "255" for 0xFF.
public static final DefaultByteFormatter S_HEX
This returns "-1" for 0xFF.
public static final DefaultByteFormatter U_HEX
This returns "ff" for 0xFF.
| Constructor Detail |
public DefaultByteFormatter(int radix,
boolean useSign)
radix - to format specified byte value.useSign - whether sign('-') is used to represent value or not.| Method Detail |
public final ObjectFormatter forObject()
ObjectFormatter.
This is useful to get ObjectFormatter
which formats value in as same manner as
format(Byte) of "this".
This adaptation is done even if
you override format(Byte) in derived classes.
DefaultUniversalFormatter.addObjectFormatter(jp.ne.dti.lares.foozy.ptlog.format.ObjectFormatter)public java.lang.String format(byte value)
ByteFormatter
format in interface ByteFormatterpublic java.lang.String format(java.lang.Byte value)
ByteFormatter
format in interface ByteFormatter
|
PTLog API - 1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||