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
33 B
7676 B
780780 B
887887 B
2300823.0 kB
298200298.2 kB
28278732.8 MB
2485801124.9 MB
193391872193.4 MB
261753212261.8 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>