public abstract class Writable extends Simple
Constructor and Description |
---|
Writable() |
Modifier and Type | Method and Description |
---|---|
abstract void |
clear()
Abstract method for clearing the Writable
data
|
static <W extends Writable> |
create(java.lang.Class<W> clazz)
Get a writable from ResourcePool
|
void |
encode(java.io.DataOutput out)
Encode the writable as DataOutput
|
static <W extends Writable> |
forClass(java.lang.String className)
Get the Class object associated with the
class or interface with the given string
name.
|
void |
free()
Free the writable from the ResourcePool
|
int |
getNumEnocdeBytes()
Get the number of Bytes of encoded data.
|
abstract int |
getNumWriteBytes()
Abstract method for getting the number of
bytes of the Writable data
|
static <W extends Writable> |
newInstance(java.lang.Class<W> clazz)
Get a new instance of the class
|
abstract void |
read(java.io.DataInput in)
Abstract method for reading Writable data
from DataInput
|
void |
release()
Release the writable from the ResourcePool
|
abstract void |
write(java.io.DataOutput out)
Abstract method for writing Writable data to
DataOutPut
|
public final int getNumEnocdeBytes()
getNumEnocdeBytes
in class Transferable
public final void encode(java.io.DataOutput out) throws java.io.IOException
encode
in class Transferable
java.io.IOException
public static final <W extends Writable> W newInstance(java.lang.Class<W> clazz)
public static final <W extends Writable> W create(java.lang.Class<W> clazz)
public static final <W extends Writable> java.lang.Class<W> forClass(java.lang.String className)
className
- public final void release()
release
in class Transferable
public final void free()
free
in class Transferable
public abstract void write(java.io.DataOutput out) throws java.io.IOException
out
- java.io.IOException
public abstract void read(java.io.DataInput in) throws java.io.IOException
in
- java.io.IOException
public abstract void clear()
public abstract int getNumWriteBytes()