code: public void exportTo(OutputStream output) throws DescriptorExportException, IllegalArgumentException
     {
        if (output == null)
           throw new IllegalArgumentException("Output is null");
  
        try
        {
           int read = 0;
           while ((read = is.read()) != -1)
           {
              output.write(read);
           }
  
           output.flush();
        }
        catch (IOException ioe)
        {
           throw new DescriptorExportException("Error during exportTo: " + ioe.getMessage(), ioe);
        }      
        finally
        {
           try
           {
              is.close();
           }
           catch (IOException ioe)
           {
              // Ignore
           }
        }
     }
docs: {@inheritDoc}