|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.io.ArrayPrimitiveWritable
@InterfaceAudience.Public @InterfaceStability.Stable public class ArrayPrimitiveWritable
This is a wrapper class. It wraps a Writable implementation around an array of primitives (e.g., int[], long[], etc.), with optimized wire format, and without creating new objects per element. This is a wrapper class only; it does not make a copy of the underlying array.
| Constructor Summary | |
|---|---|
ArrayPrimitiveWritable()
Construct an empty instance, for use during Writable read |
|
ArrayPrimitiveWritable(Class<?> componentType)
Construct an instance of known type but no value yet for use with type-specific wrapper classes |
|
ArrayPrimitiveWritable(Object value)
Wrap an existing array of primitives |
|
| Method Summary | |
|---|---|
Object |
get()
Get the original array. |
Class<?> |
getComponentType()
|
Class<?> |
getDeclaredComponentType()
|
boolean |
isDeclaredComponentType(Class<?> componentType)
|
void |
readFields(DataInput in)
Deserialize the fields of this object from in. |
void |
set(Object value)
|
void |
write(DataOutput out)
Serialize the fields of this object to out. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ArrayPrimitiveWritable()
public ArrayPrimitiveWritable(Class<?> componentType)
public ArrayPrimitiveWritable(Object value)
value - - array of primitives| Method Detail |
|---|
public Object get()
public Class<?> getComponentType()
public Class<?> getDeclaredComponentType()
public boolean isDeclaredComponentType(Class<?> componentType)
public void set(Object value)
public void write(DataOutput out)
throws IOException
Writableout.
write in interface Writableout - DataOuput to serialize this object into.
IOException
public void readFields(DataInput in)
throws IOException
Writablein.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
readFields in interface Writablein - DataInput to deseriablize this object from.
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||