com.caucho.config.types
Class Bytes

java.lang.Object
  extended by com.caucho.config.types.Bytes

public class Bytes
extends java.lang.Object

Returns a number of bytes, allowing EL expressions. Default is bytes.

 b  : bytes
 k  : kilobytes
 kb : kilobytes
 m  : megabytes
 mb : megabytes
 g  : gigabytes
 


Field Summary
static long BYTE
           
static long GIGABYTE
           
static long INFINITE
           
static long KILOBYTE
           
static long MEGABYTE
           
 
Constructor Summary
Bytes()
           
Bytes(long bytes)
           
 
Method Summary
 void addText(java.lang.String text)
          Sets the text.
 long getBytes()
          Replace with the real bytes.
static long toBytes(java.lang.String bytes)
          Converts a byte string to a number of bytes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BYTE

public static final long BYTE
See Also:
Constant Field Values

KILOBYTE

public static final long KILOBYTE
See Also:
Constant Field Values

MEGABYTE

public static final long MEGABYTE
See Also:
Constant Field Values

GIGABYTE

public static final long GIGABYTE
See Also:
Constant Field Values

INFINITE

public static final long INFINITE
See Also:
Constant Field Values
Constructor Detail

Bytes

public Bytes()

Bytes

public Bytes(long bytes)
Method Detail

addText

public void addText(java.lang.String text)
             throws ConfigException
Sets the text.

Throws:
ConfigException

getBytes

public long getBytes()
Replace with the real bytes.


toBytes

public static long toBytes(java.lang.String bytes)
                    throws ConfigException
Converts a byte string to a number of bytes. Default is bytes.
 b  : bytes
 k  : kilobytes
 kb : kilobytes
 m  : megabytes
 mb : megabytes
 g  : gigabytes
 

Throws:
ConfigException