public void prepareForReading() throws IOException {
    if (!isOpen) {
      return;
    }
    if (output.getLength() > 0) {
      fileOutputStream.write(output.getData(), 0, output.getLength());
      totalWriteLength += output.getLength();
      fileOutputStream.flush();
      output.reset();
    }
    if (fileInputStream != null) {
      fileInputStream.close();
    }
    fileInputStream = new FileInputStream(tmpFile);
    readNextIndex = 0;
    readNextCount = 0;
  }
An eager bytes container that puts row bytes to an output stream.
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/rowbytescontainer/VectorRowBytesContainer.java