org.apache.hadoop.hbase.hbql.io
Class Serialization

java.lang.Object
  extended by org.apache.hadoop.hbase.hbql.io.Serialization
Direct Known Subclasses:
HadoopSerialization, JavaSerialization

public abstract class Serialization
extends Object


Nested Class Summary
static class Serialization.TYPE
           
 
Constructor Summary
Serialization()
           
 
Method Summary
abstract  byte[] getArrayAsBytes(FieldType fieldType, Object obj)
           
abstract  Object getArrayFromBytes(FieldType fieldType, Class clazz, byte[] b)
           
 Boolean getBooleanFromBytes(byte[] b)
           
 Byte getByteFromBytes(byte[] b)
           
protected  String getExceptionMessage(String name, Exception e)
           
 byte[] getNumberEqualityBytes(FieldType fieldType, Number val)
           
 Number getNumberFromBytes(FieldType fieldType, byte[] b)
           
 byte[] getObjectAsBytes(Object obj)
           
 Object getObjectFromBytes(byte[] b)
           
abstract  byte[] getScalarAsBytes(FieldType fieldType, Object obj)
           
abstract  Object getScalarFromBytes(FieldType fieldType, byte[] b)
           
static Serialization getSerializationStrategy(Serialization.TYPE type)
           
 byte[] getStringAsBytes(String obj)
           
 String getStringFromBytes(byte[] b)
           
 boolean isSerializable(Object obj)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Serialization

public Serialization()
Method Detail

getSerializationStrategy

public static Serialization getSerializationStrategy(Serialization.TYPE type)

getNumberFromBytes

public Number getNumberFromBytes(FieldType fieldType,
                                 byte[] b)
                          throws HBqlException
Throws:
HBqlException

getStringFromBytes

public String getStringFromBytes(byte[] b)
                          throws HBqlException
Throws:
HBqlException

getByteFromBytes

public Byte getByteFromBytes(byte[] b)
                      throws HBqlException
Throws:
HBqlException

getBooleanFromBytes

public Boolean getBooleanFromBytes(byte[] b)
                            throws HBqlException
Throws:
HBqlException

getStringAsBytes

public byte[] getStringAsBytes(String obj)
                        throws HBqlException
Throws:
HBqlException

getNumberEqualityBytes

public byte[] getNumberEqualityBytes(FieldType fieldType,
                                     Number val)
                              throws HBqlException
Throws:
HBqlException

getObjectFromBytes

public Object getObjectFromBytes(byte[] b)
                          throws HBqlException
Throws:
HBqlException

getObjectAsBytes

public byte[] getObjectAsBytes(Object obj)
                        throws HBqlException
Throws:
HBqlException

getScalarFromBytes

public abstract Object getScalarFromBytes(FieldType fieldType,
                                          byte[] b)
                                   throws HBqlException
Throws:
HBqlException

getScalarAsBytes

public abstract byte[] getScalarAsBytes(FieldType fieldType,
                                        Object obj)
                                 throws HBqlException
Throws:
HBqlException

getArrayFromBytes

public abstract Object getArrayFromBytes(FieldType fieldType,
                                         Class clazz,
                                         byte[] b)
                                  throws HBqlException
Throws:
HBqlException

getArrayAsBytes

public abstract byte[] getArrayAsBytes(FieldType fieldType,
                                       Object obj)
                                throws HBqlException
Throws:
HBqlException

isSerializable

public boolean isSerializable(Object obj)

getExceptionMessage

protected String getExceptionMessage(String name,
                                     Exception e)


Copyright © 2011. All Rights Reserved.