to.etc.domui.converter
Class IntSizeConverter

java.lang.Object
  extended by to.etc.domui.converter.IntSizeConverter
All Implemented Interfaces:
IConverter<java.lang.Integer>, IObjectToStringConverter<java.lang.Integer>, IStringToObjectConverter<java.lang.Integer>

public class IntSizeConverter
extends java.lang.Object
implements IConverter<java.lang.Integer>

Converter to convert a computer "size" to a size in bytes, KB, MB, GB etc.

Author:
Frits Jalvingh Created on Jul 30, 2009

Constructor Summary
IntSizeConverter()
           
 
Method Summary
 java.lang.String convertObjectToString(java.util.Locale loc, java.lang.Integer in)
           
 java.lang.Integer convertStringToObject(java.util.Locale loc, java.lang.String in)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntSizeConverter

public IntSizeConverter()
Method Detail

convertObjectToString

public java.lang.String convertObjectToString(java.util.Locale loc,
                                              java.lang.Integer in)
                                       throws UIException
Specified by:
convertObjectToString in interface IObjectToStringConverter<java.lang.Integer>
Throws:
UIException

convertStringToObject

public java.lang.Integer convertStringToObject(java.util.Locale loc,
                                               java.lang.String in)
                                        throws UIException
Specified by:
convertStringToObject in interface IStringToObjectConverter<java.lang.Integer>
Throws:
UIException