code: @Override
     public InputStream getAsStream() throws IOException
     {
        if (isByteArrayAfterSpool())
        {
           return new ByteArrayInputStream(data); // from bytes
        }
        else
        {
           if (spoolFile != null)
           {
              return PrivilegedFileHelper.fileInputStream(spoolFile); // from spool file
           }
           else
           {
              throw new IllegalArgumentException("Stream already consumed");
           }
        }
     }
docs: {@inheritDoc}