From d12a783ffe81907793eb973bc16deae8617db544 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Fri, 24 Apr 2015 14:21:15 +0000
Subject: [PATCH] Moved INT_SIZE, LONG_SIZE, KB and MB constants to StaticUtils.

---
 opendj-server-legacy/src/main/java/org/opends/server/util/StaticUtils.java |   24 +++++++++++++++++++++++-
 1 files changed, 23 insertions(+), 1 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/util/StaticUtils.java b/opendj-server-legacy/src/main/java/org/opends/server/util/StaticUtils.java
index 93199cd..4705336 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/util/StaticUtils.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/util/StaticUtils.java
@@ -78,9 +78,31 @@
 {
   private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
 
+  /** The number of bytes of a Java int. A Java int is 32 bits, i.e. 4 bytes. */
+  public static final int INT_SIZE = 4;
+  /** The number of bytes of a Java long. A Java int is 64 bits, i.e. 8 bytes. */
+  public static final int LONG_SIZE = 8;
+
   /**
-   * Private constructor to prevent instantiation.
+   * Number of bytes in a Kibibyte.
+   * <p>
+   * Example usage:
+   * <pre>
+   * int _10KB = 10 * KB;
+   * <pre>
    */
+  public static final int KB = 1024;
+  /**
+   * Number of bytes in a Mebibyte.
+   * <p>
+   * Example usage:
+   * <pre>
+   * int _10MB = 10 * MB;
+   * <pre>
+   */
+  public static final int MB = KB * KB;
+
+  /** Private constructor to prevent instantiation. */
   private StaticUtils() {
     // No implementation required.
   }

--
Gitblit v1.10.0