Class Bytes
java.lang.Object
com.oracle.coherence.common.util.MemorySize
com.tangosol.coherence.config.unit.Bytes
public class Bytes
extends com.oracle.coherence.common.util.MemorySize
Bytes is a specialized MemorySize whose default constructor
assumes that the specified units (when a magnitude is not specified) are always bytes.
Note: This class is provided to simplify and support backwards compatibility
during the injection of MemorySizes into appropriate classes. This
class is not designed for general purpose representation of
capacity. For general purpose representations of memory capacity, please use the
MemorySize class.
- Since:
- Coherence 12.1.2
- Author:
- bo 2012.01.19
-
Nested Class Summary
Nested classes/interfaces inherited from class com.oracle.coherence.common.util.MemorySize
com.oracle.coherence.common.util.MemorySize.Magnitude -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.oracle.coherence.common.util.MemorySize
as, equals, getByteCount, hashCode, toString, toString
-
Constructor Details
-
Bytes
public Bytes(int c) Constructs aBytesrepresenting aMemorySizemeasured in bytes.- Parameters:
c- the number of bytes
-
Bytes
public Bytes(com.oracle.coherence.common.util.MemorySize m) Constructs aBytesbased on anotherMemorySize.- Parameters:
m- theMemorySize
-
Bytes
Constructs aBytesrepresenting aMemorySizemeasured in bytes.- Parameters:
s- the number of bytes or otherMemorySizewhen magnitudes are specified- See Also:
-
-
Method Details
-
get
public long get()Obtain theMemorySizein bytes.- Returns:
- the number of bytes in the
MemorySize
-