|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cc.framework.convert.imp.ByteSizeConverter
Converter for Byte sizes
Field Summary | |
static java.lang.String |
CONVERTER_ID
Converter Id |
private static java.lang.String[] |
SUFFIX
The Size Units |
Constructor Summary | |
ByteSizeConverter()
|
Method Summary | |
java.lang.Object |
getAsObject(RequestContext ctx,
java.lang.String newValue)
Converts the given String value into the Converters Datatype |
java.lang.String |
getAsString(RequestContext ctx,
java.lang.Object value)
Converts the Object of the converters Datatype into it's String representation |
static java.lang.String |
toByteSize(long byteSize)
Converts a long value into a byte size string |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String CONVERTER_ID
private static final java.lang.String[] SUFFIX
Constructor Detail |
public ByteSizeConverter()
Method Detail |
public java.lang.Object getAsObject(RequestContext ctx, java.lang.String newValue) throws ConverterException
Converter
getAsObject
in interface Converter
ctx
- Request ContextnewValue
- The String Value to convert
ConverterException
- is thrown when a conversion error occursConverter.getAsObject(com.cc.framework.adapter.RequestContext, java.lang.String)
public java.lang.String getAsString(RequestContext ctx, java.lang.Object value) throws ConverterException
Converter
getAsString
in interface Converter
ctx
- Request Contextvalue
- The Object to convert
ConverterException
- is thrown when a conversion error occursConverter.getAsString(com.cc.framework.adapter.RequestContext, java.lang.Object)
public static java.lang.String toByteSize(long byteSize)
byteSize
- the size to convert (in bytes)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |