@InterfaceAudience.Public @InterfaceStability.Stable public class ArrayPrimitiveWritable extends Object implements Writable
| Constructor and Description |
|---|
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
|
| Modifier and Type | Method and Description |
|---|---|
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. |
public ArrayPrimitiveWritable()
public ArrayPrimitiveWritable(Class<?> componentType)
public ArrayPrimitiveWritable(Object value)
value - - array of primitivespublic 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.IOExceptionpublic 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.IOExceptionCopyright © 2019 Apache Software Foundation. All rights reserved.