@@ -0,0 +1,1179 @@
+package com.addicks.sendash.admin.test;%0A%0Aimport java.io.File;%0Aimport java.io.FileOutputStream;%0Aimport java.io.IOException;%0Aimport java.io.InputStream;%0Aimport java.io.OutputStream;%0A%0Apublic class InputStreamToFile %7B%0A%0A  public static File convert(InputStream inputStream, String fileType) %7B%0A%0A    OutputStream outputStream = null;%0A%0A    try %7B%0A      // write the inputStream to a FileOutputStream%0A      outputStream = new FileOutputStream(new File(%22./temp%22 + fileType));%0A%0A      int read = 0;%0A      byte%5B%5D bytes = new byte%5B1024%5D;%0A%0A      while ((read = inputStream.read(bytes)) != -1) %7B%0A        outputStream.write(bytes, 0, read);%0A      %7D%0A%0A      System.out.println(%22Done!%22);%0A%0A    %7D%0A    catch (IOException e) %7B%0A      e.printStackTrace();%0A    %7D%0A    finally %7B%0A      if (inputStream != null) %7B%0A        try %7B%0A          inputStream.close();%0A        %7D%0A        catch (IOException e) %7B%0A          e.printStackTrace();%0A        %7D%0A      %7D%0A      if (outputStream != null) %7B%0A        try %7B%0A          // outputStream.flush();%0A          outputStream.close();%0A        %7D%0A        catch (IOException e) %7B%0A          e.printStackTrace();%0A        %7D%0A%0A      %7D%0A    %7D%0A    return new File(%22./temp%22 + fileType);%0A  %7D%0A%7D%0A

convert an inputstream to a file.