code: public InputStream setPersistedURL(URL url, boolean spoolContent) throws IOException
     {
        InputStream result = null;
        this.url = url;
        this.spoolContent = spoolContent;
  
        // JCR-2326 Release the current ValueData from tempFile users before
        // setting its reference to null so it will be garbage collected.
        if (!spoolContent && this.tempFile != null)
        {
           this.tempFile.release(this);
           this.tempFile = null;
        }
        else if (spoolContent && tempFile == null && stream != null)
        {
           spoolContent(stream);
           result = new FileInputStream(tempFile);
        }
        this.stream = null;
        return result;
     }
docs: Sets persistent URL. Will reset (null) the stream and will spool the content of the stream if <code>spoolContent</code>
  has been set to <code>true</code>.
  This method should be called only from persistent layer (Value storage).
  
  @param url the url to which the data has been persisted
  @param spoolContent Indicates whether or not the content should always be spooled