{
      InputStream inputStream = new FileInputStream(temporaryFileName);
      for (int length = inputStream.read(outputbytes, 0, outputbytes.length); length > 0; length = inputStream.read(
        outputbytes,
        0,
        outputbytes.length))
      {
        os.write(outputbytes, 0, length);
        count += length;
        if (count > flushThreshold)
        {
          os.flush();
          count = 0;
        }
      }
      inputStream.close();
      new File(temporaryFileName).delete();
    }