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
9090 B
470470 B
24522.5 kB
77397.7 kB
916547916.5 kB
75899517.6 MB
6944005269.4 MB
743521564743.5 MB
18011436711.8 GB
		<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>