Class FileSizeConverter

  • All Implemented Interfaces:
    Serializable, javax.faces.convert.Converter<Object>

    public class FileSizeConverter
    extends Object
    implements javax.faces.convert.Converter<Object>, Serializable
    Converter between a file size in bytes and a human readable representation, such as 5.3 MB
    Author:
    XIMA MEDIA GmbH
    See Also:
    Serialized Form
    • Constructor Detail

      • FileSizeConverter

        public FileSizeConverter()
    • Method Detail

      • getAsObject

        public Object getAsObject​(javax.faces.context.FacesContext context,
                                  javax.faces.component.UIComponent component,
                                  String value)
        Specified by:
        getAsObject in interface javax.faces.convert.Converter<Object>
      • getAsString

        public String getAsString​(javax.faces.context.FacesContext context,
                                  javax.faces.component.UIComponent component,
                                  Object value)
        Specified by:
        getAsString in interface javax.faces.convert.Converter<Object>