Human File Size

jeesl:humanFileSize(sizeInLong) is a function that convert long value of file size to readable file size like 1kb, 2mb or 1gb.

LongText
77 B
4040 B
933933 B
33743.4 kB
5451554.5 kB
745078745.1 kB
97789419.8 MB
7979919079.8 MB
986959007987.0 MB
695593186695.6 MB
		<p:dataTable var="l" value="#{humanFileSizeBean.list}" styleClass="jeesl-datatable">
			<p:column headerText="Long">  
				<h:outputText value="#{l}"/>
			</p:column>
			<p:column headerText="Text">  
				<h:outputText value="#{jeesl:humanFileSize(l)}"/>
			</p:column>
		</p:dataTable>