public class CacheSizes extends Object
Title: 常用代码打包
Description: Utility class for determining the sizes in bytes of commonly used objects. Classes implementing the Cacheable interface should use this class to determine their size.
Copyright: Copyright (c) 2006
Company: www.justdos.net
| 构造器和说明 |
|---|
CacheSizes() |
| 限定符和类型 | 方法和说明 |
|---|---|
static int |
sizeOfBoolean()
Returns the size in bytes of a primitive boolean.
|
static int |
sizeOfChar()
Returns the size in bytes of a primitive char.
|
static int |
sizeOfDate()
Returns the size in bytes of a Date.
|
static int |
sizeOfDouble()
Returns the size in bytes of a primitive double.
|
static int |
sizeOfInt()
Returns the size in bytes of a primitive int.
|
static int |
sizeOfList(List list)
Returns the size in bytes of a List object.
|
static int |
sizeOfLong()
Returns the size in bytes of a primitive long.
|
static int |
sizeOfMap(Map map)
Returns the size in bytes of a Map object.
|
static int |
sizeOfObject()
Returns the size in bytes of a basic Object.
|
static int |
sizeOfObject(Object obj) |
static int |
sizeOfString(String string)
Returns the size in bytes of a String.
|
public static int sizeOfObject()
public static int sizeOfObject(Object obj)
public static int sizeOfString(String string)
string - the String to determine the size of.public static int sizeOfInt()
public static int sizeOfChar()
public static int sizeOfBoolean()
public static int sizeOfLong()
public static int sizeOfDouble()
public static int sizeOfDate()
public static int sizeOfMap(Map map)
map - the Map object to determine the size of.public static int sizeOfList(List list)
list - the List object to determine the size of.Copyright © 2023 onecode. All rights reserved.