public static byte[] createByteArray(BytesWritable sourceBw){
    //TODO should replace with BytesWritable.copyData() once Hive
    //removes support for the Hadoop 0.20 series.
    return Arrays.copyOf(sourceBw.getBytes(), sourceBw.getLength());
  }
gets a byte[] with copy of data from source BytesWritable
@param sourceBw - source BytesWritable
serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazyUtils.java