public class JsonWritable extends Object implements org.apache.hadoop.io.Writable
| Constructor and Description |
|---|
JsonWritable()
Creates an empty
JsonWritable. |
JsonWritable(String s)
Creates a
JsonWritable with an initial value. |
| Modifier and Type | Method and Description |
|---|---|
static JsonWritable |
create(byte[] bytes) |
static JsonWritable |
create(DataInput in) |
com.google.gson.JsonObject |
getJsonObject() |
void |
readFields(DataInput in)
Deserializes a
JsonWritable object. |
byte[] |
serialize()
Returns the serialized representation of this object as a byte array.
|
String |
toString() |
void |
write(DataOutput out)
Serializes this object.
|
public JsonWritable()
JsonWritable.public JsonWritable(String s)
JsonWritable with an initial value.public void readFields(DataInput in) throws IOException
JsonWritable object.readFields in interface org.apache.hadoop.io.Writablein - source for raw byte representationIOExceptionpublic void write(DataOutput out) throws IOException
write in interface org.apache.hadoop.io.Writableout - where to write the raw byte representationIOExceptionpublic byte[] serialize()
throws IOException
IOExceptionpublic com.google.gson.JsonObject getJsonObject()
public static JsonWritable create(DataInput in) throws IOException
IOExceptionpublic static JsonWritable create(byte[] bytes) throws IOException
IOExceptionCopyright © 2018. All rights reserved.