public class CastUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static org.apache.commons.logging.Log |
mLog |
| Constructor and Description |
|---|
CastUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Object |
convertToType(LoadCaster caster,
byte[] bytes,
ResourceSchema.ResourceFieldSchema fieldSchema,
byte dataType) |
static Boolean |
stringToBoolean(String str) |
static Double |
stringToDouble(String str) |
static Float |
stringToFloat(String str) |
static Integer |
stringToInteger(String str) |
static Long |
stringToLong(String str) |
public static Object convertToType(LoadCaster caster, byte[] bytes, ResourceSchema.ResourceFieldSchema fieldSchema, byte dataType) throws IOException
caster - LoadCaster to be used to convert the bytes into a field.bytes - fieldSchema - schema of Bag or Tuple; pass in null if a simple type.dataType - type from DataTypeIOExceptionCopyright © 2007-2017 The Apache Software Foundation