Back to project page android-simple-storage.
The source code is released under:
Apache License
If you think the Android project android-simple-storage listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.sromku.simple.storage.helpers; /*from w ww .ja va 2s.c o m*/ public enum SizeUnit { B(1), KB(SizeUnit.BYTES), MB(SizeUnit.BYTES * SizeUnit.BYTES), GB(SizeUnit.BYTES * SizeUnit.BYTES * SizeUnit.BYTES), TB(SizeUnit.BYTES * SizeUnit.BYTES * SizeUnit.BYTES * SizeUnit.BYTES); private long inBytes; private static final int BYTES = 1024; private SizeUnit(long bytes) { this.inBytes = bytes; } public long inBytes() { return inBytes; } }