public static byte[] readByteArray(final DataInput in) throws IOException {
  int len=WritableUtils.readVInt(in);
  if (len < 0) {
    throw new NegativeArraySizeException(Integer.toString(len));
  }
  byte[] result=new byte[len];
  in.readFully(result,0,len);
  return result;
}

public static byte [ ] readByteArray ( final DataInput in ) throws IOException { int len = WritableUtils . readVInt ( in ) ; if ( len < 0 ) { throw new NegativeArraySizeException ( Integer . toString ( len ) ) ; } byte [ ] result = new byte [ len ] ; in . readFully ( result , 0 , len ) ; return result ; }
read byte - array written with a writableableutils . vint prefix .
