Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.fujitsu.iflow.model.util
Class SizeUtility

    java.lang.Object
      com.fujitsu.iflow.model.util.SizeUtility

public class SizeUtility
extends java.lang.Object

A utility class to calculate java data types

Field Summary
`static int` | `BOOLEAN_FIELD_SIZE`
`static int` | `BYTE_FIELD_SIZE`
`static int` | `CHAR_FIELD_SIZE`
`static int` | `DATE_OBJECT_SIZE`
`static int` | `DOUBLE_FIELD_SIZE`
`static int` | `END_POINT_SIZE`
`static int` | `FLOAT_FIELD_SIZE`
`static int` | `INT_FIELD_SIZE`
`static int` | `LONG_FIELD_SIZE`
`static int` | `MIDDLE_POINT_SIZE`
`static int` | `OBJREF_SIZE`
`static int` | `SHORT_FIELD_SIZE`
`static int` | `START_POINT_SIZE`

Constructor Summary
`SizeUtility()`

Method Summary
`static int` | `sizeOf(boolean flag)` Calculate the size of boolean data value
`static int` | `sizeOf(byte byt)` Calculate the size of byte data value
`static int` | `sizeOf(char chr)` Calculate the size of char data value
`static int` | `sizeOf(double num)` Calculate the size of double data value
`static int` | `sizeOf(float num)` Calculate the size of float data value
`static int` | `sizeOf(int num)` Calculate the size of int data value
`static int` | `sizeOf(long num)` Calculate the size of long data value
`static int` | `sizeOf(java.lang.Object obj)` Calculate the size of object reference
`static int` | `sizeOf(short num)` Calculate the size of short data value
`static long` | `sizeOf(java.lang.String str)` Calculate the size of string data value

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### OBJREF_SIZE

    public static final int OBJREF_SIZE

See Also:
  Constant Field Values

### LONG_FIELD_SIZE

    public static final int LONG_FIELD_SIZE

See Also:
  Constant Field Values

### INT_FIELD_SIZE

    public static final int INT_FIELD_SIZE

See Also:
  Constant Field Values

### SHORT_FIELD_SIZE

    public static final int SHORT_FIELD_SIZE

See Also:
  Constant Field Values

### CHAR_FIELD_SIZE

    public static final int CHAR_FIELD_SIZE

See Also:
  Constant Field Values

### BYTE_FIELD_SIZE

    public static final int BYTE_FIELD_SIZE

See Also:
  Constant Field Values

### BOOLEAN_FIELD_SIZE

    public static final int BOOLEAN_FIELD_SIZE

See Also:
  Constant Field Values

### DOUBLE_FIELD_SIZE

    public static final int DOUBLE_FIELD_SIZE

See Also:
  Constant Field Values

### FLOAT_FIELD_SIZE

    public static final int FLOAT_FIELD_SIZE

See Also:
  Constant Field Values

### START_POINT_SIZE

    public static final int START_POINT_SIZE

See Also:
  Constant Field Values

### END_POINT_SIZE

    public static final int END_POINT_SIZE

See Also:
  Constant Field Values

### MIDDLE_POINT_SIZE

    public static final int MIDDLE_POINT_SIZE

See Also:
  Constant Field Values

### DATE_OBJECT_SIZE

    public static final int DATE_OBJECT_SIZE

See Also:
  Constant Field Values

Constructor Detail

### SizeUtility

    public SizeUtility()

Method Detail

### sizeOf

    public static int sizeOf(java.lang.Object obj)

  Calculate the size of object reference

  Parameters:
    `obj` - the object reference
  Returns:
    the size of object reference (in bytes)

### sizeOf

    public static int sizeOf(long num)

  Calculate the size of long data value

  Parameters:
    `num` - the long value
  Returns:
    the size of long value (in bytes)

### sizeOf

    public static int sizeOf(int num)

  Calculate the size of int data value

  Parameters:
    `num` - the int value
  Returns:
    the size of int value (in bytes)

### sizeOf

    public static int sizeOf(short num)

  Calculate the size of short data value

  Parameters:
    `num` - the short value
  Returns:
    the size of short value (in bytes)

### sizeOf

    public static int sizeOf(char chr)

  Calculate the size of char data value

  Parameters:
    `chr` - the char value
  Returns:
    the size of char value (in bytes)

### sizeOf

    public static int sizeOf(byte byt)

  Calculate the size of byte data value

  Parameters:
    `byt` - the byte value
  Returns:
    the size of long value (in bytes)

### sizeOf

    public static int sizeOf(boolean flag)

  Calculate the size of boolean data value

  Parameters:
    `flag` - the boolean value
  Returns:
    the size of boolean value (in bytes)

### sizeOf

    public static int sizeOf(double num)

  Calculate the size of double data value

  Parameters:
    `num` - the double value
  Returns:
    the size of double value (in bytes)

### sizeOf

    public static int sizeOf(float num)

  Calculate the size of float data value

  Parameters:
    `num` - the float value
  Returns:
    the size of float value (in bytes)

### sizeOf

    public static long sizeOf(java.lang.String str)

  Calculate the size of string data value

  Parameters:
    `str` - the string value
  Returns:
    the size of string value (in bytes)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD