public void clear() {
    if (fileInputStream != null) {
      try {
        fileInputStream.close();
      } catch (Throwable ignored) {
      }
      fileInputStream = null;
    }
    if (fileOutputStream != null) {
      try {
        fileOutputStream.close();
      } catch (Throwable ignored) {
      }
      fileOutputStream = null;
    }

    if (parentDir != null) {
      try {
        FileUtil.fullyDelete(parentDir);
      } catch (Throwable ignored) {
      }
    }
    parentDir = null;
    tmpFile = null;
    isOpen = false;
    totalWriteLength = 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