There is a toArray() method in ArrayWritable class in hadoop which should mean: convert this ArrayWritable to an array. But the syntax of of it is:
public Object toArray()
So how should we use this function? There is no documentation about it on doc package.
Usually the ArrayWritable has to be extended as appropriate
Here is the code from the ArrayWritable
So, ArrayWritable#toArray would return a java.lang.reflect.Array of the type specified in the
super(Text.class);of the TextArrayWritable or the appropriate class.