com.thimbleware.jmemcached.util
Class BufferUtils

java.lang.Object
  extended by com.thimbleware.jmemcached.util.BufferUtils

public class BufferUtils
extends java.lang.Object


Constructor Summary
BufferUtils()
           
 
Method Summary
static int atoi(org.jboss.netty.buffer.ChannelBuffer s)
           
static long atol(org.jboss.netty.buffer.ChannelBuffer s)
           
static org.jboss.netty.buffer.ChannelBuffer 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 org.jboss.netty.buffer.ChannelBuffer 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

atoi

public static int atoi(org.jboss.netty.buffer.ChannelBuffer s)
                throws java.lang.NumberFormatException
Throws:
java.lang.NumberFormatException

atol

public static long atol(org.jboss.netty.buffer.ChannelBuffer s)
                 throws java.lang.NumberFormatException
Throws:
java.lang.NumberFormatException

itoa

public static org.jboss.netty.buffer.ChannelBuffer 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

ltoa

public static org.jboss.netty.buffer.ChannelBuffer ltoa(long i)


Copyright © 2008-2011 ThimbleWare. All Rights Reserved.