code: private void spoolContent(InputStream is) throws IOException, FileNotFoundException
     {
        SwapFile swapFile =
           SwapFile.get(spoolConfig.tempDirectory, System.currentTimeMillis() + "_" + SEQUENCE.incrementAndGet(),
              spoolConfig.fileCleaner);
        try
        {
           OutputStream os = PrivilegedFileHelper.fileOutputStream(swapFile); 
           try
           {
              byte[] bytes = new byte[1024];
              int length;
              while ((length = is.read(bytes)) != -1)
              {
                 os.write(bytes, 0, length);
              }
           }
           finally
           {
              os.close();
           }
        }
        finally
        {
           swapFile.spoolDone();
           is.close();
        }
        tempFile = swapFile;
     }
docs: Spools the content extracted from the URL