GigaSpaces XAP 10.0.1 API

org.openspaces.memcached.util
Class BufferUtils

java.lang.Object
  extended by org.openspaces.memcached.util.BufferUtils

public class BufferUtils
extends Object


Constructor Summary
BufferUtils()
           
 
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
 

Constructor Detail

BufferUtils

public BufferUtils()
Method Detail

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

GigaSpaces XAP 10.0.1 API

Copyright © GigaSpaces.