@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
Writable
out
.write
in interface Writable
out
- DataOuput
to serialize this object into.IOException
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
in interface Writable
in
- DataInput
to deseriablize this object from.IOException
Copyright © 2021 Apache Software Foundation. All rights reserved.