org.openspaces.memcached.util
Class BufferUtils
java.lang.Object
  
org.openspaces.memcached.util.BufferUtils
public class BufferUtils
- extends Object
 
 
| 
Method Summary | 
static int | 
atoi(byte[] s)
 
            | 
static long | 
atol(byte[] s)
 
            | 
static byte[] | 
itoa(int i)
 
          Blatant copy of Integer.toString, but returning a byte array instead of a String, as
  string charset decoding/encoding was killing us on performance. | 
static byte[] | 
ltoa(long i)
 
            | 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
BufferUtils
public BufferUtils()
itoa
public static byte[] itoa(int i)
- Blatant copy of Integer.toString, but returning a byte array instead of a String, as
  string charset decoding/encoding was killing us on performance.
- Parameters:
 i - integer to convert
- Returns:
 - byte[] array containing literal ASCII char representation
 
 
 
atoi
public static int atoi(byte[] s)
                throws NumberFormatException
- Throws:
 NumberFormatException
 
ltoa
public static byte[] ltoa(long i)
 
atol
public static long atol(byte[] s)
                 throws NumberFormatException
- Throws:
 NumberFormatException
 
Copyright © GigaSpaces.