@Override
  public void init(ByteArrayRef bytes, int start, int length) {

    long value = 0;

    try {
      in = new ByteStream.Input(bytes.getData(), start, length);
      din = new DataInputStream(in);
      value = din.readLong();
      data.set(value);
      isNull = false;
    } catch (IOException e) {
      isNull = true;
    } finally {
      try {
        din.close();
      } catch (IOException e) {
        // swallow exception
      }
      try {
        in.close();
      } catch (IOException e) {
        // swallow exception
      }
    }
  }
LazyLongBinary for storing a long value as a LongWritable. This class complements class
LazyLong. It's primary difference is the {@link #init(ByteArrayRef, int, int)} method, which
reads the long value stored in the default binary format.
serde/src/java/org/apache/hadoop/hive/serde2/lazydio/LazyDioLong.java