code: private void finishData() {
          if (!savedChunks) {
              md5 = Util.toHex(messageDigester.digest());
              messageDigester = null;
              length = totalBytes;
              savedChunks = true;
              try {
                  if (inputStream != null && closeStreamOnPersist) {
                      inputStream.close();
                  }
              } catch (IOException e) {
                  //ignore
              }
          }
      }
docs: Marks the data as fully written. This needs to be called before super.save()