@HiveDecimalWritableVersionV1
  @Override
  public void readFields(DataInput in) throws IOException {
    int scale = WritableUtils.readVInt(in);
    int byteArrayLen = WritableUtils.readVInt(in);
    byte[] bytes = new byte[byteArrayLen];
    in.readFully(bytes);

    fastReset();
    if (!fastSetFromBigIntegerBytesAndScale(bytes, 0, bytes.length, scale)) {
      throw new IOException("Couldn't convert decimal");
    }
    isSet = true;
  }
Standard Writable method that deserialize the fields of this object from a DataInput.
storage-api/src/java/org/apache/hadoop/hive/serde2/io/HiveDecimalWritable.java