Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


com.tangosol.coherence.config.unit
Class Bytes

java.lang.Object
  extended by com.oracle.common.io.MemorySize
      extended by com.tangosol.coherence.config.unit.Bytes


public class Bytes
extends com.oracle.common.io.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.common.io.MemorySize
com.oracle.common.io.MemorySize.Magnitude

 

Constructor Summary
Bytes(int c)
          Constructs a Bytes representing a MemorySize measured in bytes.
Bytes(com.oracle.common.io.MemorySize m)
          Constructs a Bytes based on another MemorySize.
Bytes(java.lang.String s)
          Constructs a Bytes representing a MemorySize measured in bytes.

 

Method Summary
 long get()
          Obtain the MemorySize in bytes.

 

Methods inherited from class com.oracle.common.io.MemorySize
as, equals, getByteCount, hashCode, toString, toString

 

Constructor Detail

Bytes

public Bytes(int c)
Constructs a Bytes representing a MemorySize measured in bytes.
Parameters:
c - the number of bytes

Bytes

public Bytes(com.oracle.common.io.MemorySize m)
Constructs a Bytes based on another MemorySize.
Parameters:
m - the MemorySize

Bytes

public Bytes(java.lang.String s)
Constructs a Bytes representing a MemorySize measured in bytes.
Parameters:
s - the number of bytes or other MemorySize when magnitudes are specified
See Also:
MemorySize.MemorySize(String, Magnitude)

Method Detail

get

public long get()
Obtain the MemorySize in bytes.
Returns:
the number of bytes in the MemorySize

Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.