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
11 B
6363 B
974974 B
35383.5 kB
2366023.7 kB
4380443.8 kB
44376964.4 MB
9451625894.5 MB
571058711571.1 MB
186582180186.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>