public class Utf8StorageConverter extends java.lang.Object implements LoadStoreCaster
PigStorage).| Modifier and Type | Field and Description | 
|---|---|
| protected BagFactory | mBagFactory | 
| protected org.apache.commons.logging.Log | mLog | 
| protected TupleFactory | mTupleFactory | 
| Constructor and Description | 
|---|
| Utf8StorageConverter() | 
| Modifier and Type | Method and Description | 
|---|---|
| DataBag | bytesToBag(byte[] b,
          ResourceSchema.ResourceFieldSchema schema)Cast data from bytearray to bag value. | 
| java.math.BigDecimal | bytesToBigDecimal(byte[] b)Cast data from bytearray to BigDecimal value. | 
| java.math.BigInteger | bytesToBigInteger(byte[] b)Cast data from bytearray to BigInteger value. | 
| java.lang.Boolean | bytesToBoolean(byte[] b)Cast data from bytearray to boolean value. | 
| java.lang.String | bytesToCharArray(byte[] b)Cast data from bytearray to chararray value. | 
| org.joda.time.DateTime | bytesToDateTime(byte[] b)Cast data from bytearray to datetime value. | 
| java.lang.Double | bytesToDouble(byte[] b)Cast data from bytearray to double value. | 
| java.lang.Float | bytesToFloat(byte[] b)Cast data from bytearray to float value. | 
| java.lang.Integer | bytesToInteger(byte[] b)Cast data from bytearray to integer value. | 
| java.lang.Long | bytesToLong(byte[] b)Cast data from bytearray to long value. | 
| java.util.Map<java.lang.String,java.lang.Object> | bytesToMap(byte[] b,
          ResourceSchema.ResourceFieldSchema fieldSchema)Cast data from bytearray to map value. | 
| Tuple | bytesToTuple(byte[] b,
            ResourceSchema.ResourceFieldSchema fieldSchema)Cast data from bytearray to tuple value. | 
| byte[] | toBytes(java.math.BigDecimal bd) | 
| byte[] | toBytes(java.math.BigInteger bi) | 
| byte[] | toBytes(java.lang.Boolean b) | 
| byte[] | toBytes(DataBag bag) | 
| byte[] | toBytes(DataByteArray a) | 
| byte[] | toBytes(org.joda.time.DateTime dt) | 
| byte[] | toBytes(java.lang.Double d) | 
| byte[] | toBytes(java.lang.Float f) | 
| byte[] | toBytes(java.lang.Integer i) | 
| byte[] | toBytes(java.lang.Long l) | 
| byte[] | toBytes(java.util.Map<java.lang.String,java.lang.Object> m) | 
| byte[] | toBytes(java.lang.String s) | 
| byte[] | toBytes(Tuple t) | 
protected BagFactory mBagFactory
protected TupleFactory mTupleFactory
protected final org.apache.commons.logging.Log mLog
public DataBag bytesToBag(byte[] b, ResourceSchema.ResourceFieldSchema schema) throws java.io.IOException
LoadCasterbytesToBag in interface LoadCasterb - bytearray to be cast.schema - field schema for the output bagjava.io.IOException - if the value cannot be cast.public java.lang.String bytesToCharArray(byte[] b)
                                  throws java.io.IOException
LoadCasterbytesToCharArray in interface LoadCasterb - bytearray to be cast.java.io.IOException - if the value cannot be cast.public java.lang.Double bytesToDouble(byte[] b)
LoadCasterbytesToDouble in interface LoadCasterb - bytearray to be cast.public java.lang.Float bytesToFloat(byte[] b)
                             throws java.io.IOException
LoadCasterbytesToFloat in interface LoadCasterb - bytearray to be cast.java.io.IOException - if the value cannot be cast.public java.lang.Boolean bytesToBoolean(byte[] b)
                                 throws java.io.IOException
LoadCasterbytesToBoolean in interface LoadCasterb - bytearray to be cast.java.io.IOException - if the value cannot be cast.public java.lang.Integer bytesToInteger(byte[] b)
                                 throws java.io.IOException
LoadCasterbytesToInteger in interface LoadCasterb - bytearray to be cast.java.io.IOException - if the value cannot be cast.public java.lang.Long bytesToLong(byte[] b)
                           throws java.io.IOException
LoadCasterbytesToLong in interface LoadCasterb - bytearray to be cast.java.io.IOException - if the value cannot be cast.public org.joda.time.DateTime bytesToDateTime(byte[] b)
                                       throws java.io.IOException
LoadCasterbytesToDateTime in interface LoadCasterb - bytearray to be cast.java.io.IOException - if the value cannot be cast.public java.util.Map<java.lang.String,java.lang.Object> bytesToMap(byte[] b,
                                                          ResourceSchema.ResourceFieldSchema fieldSchema)
                                                            throws java.io.IOException
LoadCasterbytesToMap in interface LoadCasterb - bytearray to be cast.fieldSchema - field schema for the output mapjava.io.IOException - if the value cannot be cast.public Tuple bytesToTuple(byte[] b, ResourceSchema.ResourceFieldSchema fieldSchema) throws java.io.IOException
LoadCasterbytesToTuple in interface LoadCasterb - bytearray to be cast.fieldSchema - field schema for the output tuplejava.io.IOException - if the value cannot be cast.public java.math.BigInteger bytesToBigInteger(byte[] b)
                                       throws java.io.IOException
LoadCasterbytesToBigInteger in interface LoadCasterb - bytearray to be cast.java.io.IOException - if the value cannot be cast.public java.math.BigDecimal bytesToBigDecimal(byte[] b)
                                       throws java.io.IOException
LoadCasterbytesToBigDecimal in interface LoadCasterb - bytearray to be cast.java.io.IOException - if the value cannot be cast.public byte[] toBytes(DataBag bag) throws java.io.IOException
toBytes in interface StoreCasterjava.io.IOExceptionpublic byte[] toBytes(java.lang.String s)
               throws java.io.IOException
toBytes in interface StoreCasterjava.io.IOExceptionpublic byte[] toBytes(java.lang.Double d)
               throws java.io.IOException
toBytes in interface StoreCasterjava.io.IOExceptionpublic byte[] toBytes(java.lang.Float f)
               throws java.io.IOException
toBytes in interface StoreCasterjava.io.IOExceptionpublic byte[] toBytes(java.lang.Integer i)
               throws java.io.IOException
toBytes in interface StoreCasterjava.io.IOExceptionpublic byte[] toBytes(java.lang.Long l)
               throws java.io.IOException
toBytes in interface StoreCasterjava.io.IOExceptionpublic byte[] toBytes(java.lang.Boolean b)
               throws java.io.IOException
toBytes in interface StoreCasterjava.io.IOExceptionpublic byte[] toBytes(org.joda.time.DateTime dt)
               throws java.io.IOException
toBytes in interface StoreCasterjava.io.IOExceptionpublic byte[] toBytes(java.util.Map<java.lang.String,java.lang.Object> m)
               throws java.io.IOException
toBytes in interface StoreCasterjava.io.IOExceptionpublic byte[] toBytes(Tuple t) throws java.io.IOException
toBytes in interface StoreCasterjava.io.IOExceptionpublic byte[] toBytes(DataByteArray a) throws java.io.IOException
toBytes in interface StoreCasterjava.io.IOExceptionpublic byte[] toBytes(java.math.BigInteger bi)
               throws java.io.IOException
toBytes in interface StoreCasterjava.io.IOExceptionpublic byte[] toBytes(java.math.BigDecimal bd)
               throws java.io.IOException
toBytes in interface StoreCasterjava.io.IOExceptionCopyright © 2007-2012 The Apache Software Foundation