Class ByteSize

java.lang.Object
ecmwf.common.technical.ByteSize

public class ByteSize extends Object
ECMWF Product Data Store (OpenECPDS) Project.
Since:
2024-07-01
Version:
6.7.7
Author:
Laurent Gougeon - syi@ecmwf.int, ECMWF.
  • Field Details Link icon

  • Method Details Link icon

    • ofKB Link icon

      public static ByteSize ofKB(long bytes)
      Of KB.
      Parameters:
      bytes - the bytes
      Returns:
      the byte size
    • ofMB Link icon

      public static ByteSize ofMB(long bytes)
      Of MB.
      Parameters:
      bytes - the bytes
      Returns:
      the byte size
    • ofGB Link icon

      public static ByteSize ofGB(long bytes)
      Of GB.
      Parameters:
      bytes - the bytes
      Returns:
      the byte size
    • ofTB Link icon

      public static ByteSize ofTB(long bytes)
      Of TB.
      Parameters:
      bytes - the bytes
      Returns:
      the byte size
    • ofPB Link icon

      public static ByteSize ofPB(long bytes)
      Of PB.
      Parameters:
      bytes - the bytes
      Returns:
      the byte size
    • ofEB Link icon

      public static ByteSize ofEB(long bytes)
      Of EB.
      Parameters:
      bytes - the bytes
      Returns:
      the byte size
    • size Link icon

      public long size()
      Size.
      Returns:
      the long
    • bits Link icon

      public long bits()
      Bits.
      Returns:
      the long
    • of Link icon

      public static ByteSize of(long bytesCount)
      Of.
      Parameters:
      bytesCount - the bytes count
      Returns:
      the byte size
    • parse Link icon

      public static ByteSize parse(String bytesCount)
      Parses the.
      Parameters:
      bytesCount - the bytes count
      Returns:
      the byte size
    • isZero Link icon

      public boolean isZero()
      Checks if is zero.
      Returns:
      true, if is zero
    • toString Link icon

      public String toString()
      To string.
      Overrides:
      toString in class Object