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
00 B
77 B
578578 B
790790 B
2398224.0 kB
720730720.7 kB
238142238.1 kB
3154155331.5 MB
995711410995.7 MB
20360034852.0 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>