本文整理汇总了Java中org.andengine.util.adt.data.constants.DataConstants.BYTES_PER_KILOBYTE属性的典型用法代码示例。如果您正苦于以下问题:Java DataConstants.BYTES_PER_KILOBYTE属性的具体用法?Java DataConstants.BYTES_PER_KILOBYTE怎么用?Java DataConstants.BYTES_PER_KILOBYTE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.andengine.util.adt.data.constants.DataConstants
的用法示例。
在下文中一共展示了DataConstants.BYTES_PER_KILOBYTE属性的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getPVRTextureBuffer
public ByteBuffer getPVRTextureBuffer() throws IOException {
final InputStream inputStream = this.getInputStream();
try {
final ByteBufferOutputStream os = new ByteBufferOutputStream(DataConstants.BYTES_PER_KILOBYTE, DataConstants.BYTES_PER_MEGABYTE / 2);
StreamUtils.copy(inputStream, os);
return os.toByteBuffer();
} finally {
StreamUtils.close(inputStream);
}
}
示例2: getTextureMemorySize
@Override
public int getTextureMemorySize() {
final int pixelCount = this.getWidth() * this.getHeight();
final int bytesPerPixel = this.mPixelFormat.getBitsPerPixel() / DataConstants.BITS_PER_BYTE;
return pixelCount * bytesPerPixel / DataConstants.BYTES_PER_KILOBYTE;
}
示例3: getNativeHeapSize
public static long getNativeHeapSize() {
return Debug.getNativeHeapSize() / DataConstants.BYTES_PER_KILOBYTE;
}
示例4: getNativeHeapFreeSize
public static long getNativeHeapFreeSize() {
return Debug.getNativeHeapFreeSize() / DataConstants.BYTES_PER_KILOBYTE;
}
示例5: getNativeHeapAllocatedSize
public static long getNativeHeapAllocatedSize() {
return Debug.getNativeHeapAllocatedSize() / DataConstants.BYTES_PER_KILOBYTE;
}
示例6: getDalvikHeapSize
public static long getDalvikHeapSize() {
return Runtime.getRuntime().totalMemory() / DataConstants.BYTES_PER_KILOBYTE;
}
示例7: getDalvikHeapFreeSize
public static long getDalvikHeapFreeSize() {
return Runtime.getRuntime().freeMemory() / DataConstants.BYTES_PER_KILOBYTE;
}