public class ObjectWritable extends Object implements Writable, Configurable
构造器和说明 |
---|
ObjectWritable() |
ObjectWritable(Class declaredClass,
Object instance) |
ObjectWritable(Object instance) |
限定符和类型 | 方法和说明 |
---|---|
Object |
get()
Return the instance, or null if none.
|
Configuration |
getConf()
Return the configuration used by this object.
|
Class |
getDeclaredClass()
Return the class this is meant to be.
|
void |
readFields(DataInput in)
Deserialize the fields of this object from
in . |
static Object |
readObject(DataInput in,
Configuration conf)
|
static Object |
readObject(DataInput in,
ObjectWritable objectWritable,
Configuration conf)
|
void |
set(Object instance)
Reset the instance.
|
void |
setConf(Configuration conf)
Set the configuration to be used by this object.
|
String |
toString() |
void |
write(DataOutput out)
Serialize the fields of this object to
out . |
static void |
writeObject(DataOutput out,
Object instance,
Class declaredClass,
Configuration conf)
|
public ObjectWritable()
public ObjectWritable(Object instance)
public Object get()
public Class getDeclaredClass()
public void set(Object instance)
public void readFields(DataInput in) throws IOException
Writable
in
.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
readFields
在接口中 Writable
in
- DataInput
to deseriablize this object from.IOException
public void write(DataOutput out) throws IOException
Writable
out
.write
在接口中 Writable
out
- DataOuput
to serialize this object into.IOException
public static void writeObject(DataOutput out, Object instance, Class declaredClass, Configuration conf) throws IOException
IOException
public static Object readObject(DataInput in, Configuration conf) throws IOException
IOException
public static Object readObject(DataInput in, ObjectWritable objectWritable, Configuration conf) throws IOException
IOException
public void setConf(Configuration conf)
Configurable
setConf
在接口中 Configurable
public Configuration getConf()
Configurable
getConf
在接口中 Configurable
Copyright © 2009 The Apache Software Foundation