public class NativeHandler
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private static org.apache.log4j.Logger |
log |
| Constructor and Description |
|---|
NativeHandler() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Object |
decode(byte[] b,
int flag)
Decodes byte array using memcache flag to determine type.
|
protected static java.lang.Boolean |
decodeBoolean(byte[] b) |
protected static java.lang.Byte |
decodeByte(byte[] b) |
protected static byte[] |
decodeByteArr(byte[] b) |
protected static java.lang.Character |
decodeCharacter(byte[] b) |
protected static java.util.Date |
decodeDate(byte[] b) |
protected static java.lang.Double |
decodeDouble(byte[] b) |
protected static java.lang.Float |
decodeFloat(byte[] b) |
protected static java.lang.Integer |
decodeInteger(byte[] b) |
protected static java.lang.Long |
decodeLong(byte[] b) |
protected static java.lang.Short |
decodeShort(byte[] b) |
protected static java.lang.String |
decodeString(byte[] b) |
protected static java.lang.StringBuffer |
decodeStringBuffer(byte[] b) |
protected static java.lang.StringBuilder |
decodeStringBuilder(byte[] b) |
protected static byte[] |
encode(java.lang.Boolean value) |
protected static byte[] |
encode(java.lang.Byte value) |
protected static byte[] |
encode(byte[] value) |
protected static byte[] |
encode(java.lang.Character value) |
protected static byte[] |
encode(java.util.Date value) |
protected static byte[] |
encode(double value) |
protected static byte[] |
encode(float value) |
protected static byte[] |
encode(int value) |
protected static byte[] |
encode(long value) |
static byte[] |
encode(java.lang.Object value)
Encodes supported types
|
protected static byte[] |
encode(java.lang.Short value) |
protected static byte[] |
encode(java.lang.String value) |
protected static byte[] |
encode(java.lang.StringBuffer value) |
protected static byte[] |
encode(java.lang.StringBuilder value) |
protected static byte[] |
getBytes(int value) |
protected static byte[] |
getBytes(long value) |
static int |
getMarkerFlag(java.lang.Object value)
Returns the flag for marking the type of the byte array.
|
static boolean |
isHandled(java.lang.Object value)
Detemine of object can be natively serialized by this class.
|
protected static int |
toInt(byte[] b)
This works by taking each of the bit patterns and converting them to
ints taking into account 2s complement and then adding them..
|
protected static long |
toLong(byte[] b) |
public static boolean isHandled(java.lang.Object value)
value - Object to test.public static int getMarkerFlag(java.lang.Object value)
value - Object we are storing.public static byte[] encode(java.lang.Object value)
throws java.lang.Exception
value - Object to encode.java.lang.Exception - If fail to encode.protected static byte[] encode(java.lang.Byte value)
protected static byte[] encode(java.lang.Boolean value)
protected static byte[] encode(int value)
protected static byte[] encode(long value)
throws java.lang.Exception
java.lang.Exceptionprotected static byte[] encode(java.util.Date value)
protected static byte[] encode(java.lang.Character value)
protected static byte[] encode(java.lang.String value)
throws java.lang.Exception
java.lang.Exceptionprotected static byte[] encode(java.lang.StringBuffer value)
throws java.lang.Exception
java.lang.Exceptionprotected static byte[] encode(float value)
throws java.lang.Exception
java.lang.Exceptionprotected static byte[] encode(java.lang.Short value)
throws java.lang.Exception
java.lang.Exceptionprotected static byte[] encode(double value)
throws java.lang.Exception
java.lang.Exceptionprotected static byte[] encode(java.lang.StringBuilder value)
throws java.lang.Exception
java.lang.Exceptionprotected static byte[] encode(byte[] value)
protected static byte[] getBytes(long value)
protected static byte[] getBytes(int value)
public static java.lang.Object decode(byte[] b,
int flag)
throws java.lang.Exception
b - marker - java.lang.Exceptionprotected static java.lang.Byte decodeByte(byte[] b)
protected static java.lang.Boolean decodeBoolean(byte[] b)
protected static java.lang.Integer decodeInteger(byte[] b)
protected static java.lang.Long decodeLong(byte[] b)
throws java.lang.Exception
java.lang.Exceptionprotected static java.lang.Character decodeCharacter(byte[] b)
protected static java.lang.String decodeString(byte[] b)
throws java.lang.Exception
java.lang.Exceptionprotected static java.lang.StringBuffer decodeStringBuffer(byte[] b)
throws java.lang.Exception
java.lang.Exceptionprotected static java.lang.Float decodeFloat(byte[] b)
throws java.lang.Exception
java.lang.Exceptionprotected static java.lang.Short decodeShort(byte[] b)
throws java.lang.Exception
java.lang.Exceptionprotected static java.lang.Double decodeDouble(byte[] b)
throws java.lang.Exception
java.lang.Exceptionprotected static java.util.Date decodeDate(byte[] b)
protected static java.lang.StringBuilder decodeStringBuilder(byte[] b)
throws java.lang.Exception
java.lang.Exceptionprotected static byte[] decodeByteArr(byte[] b)
protected static int toInt(byte[] b)
b - protected static long toLong(byte[] b)
Copyright © 2005 - greg whalin