code: @Override
      public void exportTo(final OutputStream target) throws ArchiveExportException, IllegalArgumentException {
          // Precondition checks
          if (target == null) {
              throw new IllegalArgumentException("Target must be specified");
          }
  
          // Get Stream
          final InputStream in = this.exportAsInputStream();
  
          try {
              // Write out
              try {
                  IOUtil.copy(in, target);
              } catch (final IOException e) {
                  throw new ArchiveExportException("Error encountered in exporting archive to " + target, e);
              }
          } finally {
              // Close
              try {
                  in.close();
              } catch (final IOException ioe) {
                  // Just log
                  log.warning("Could not close " + in + ": " + ioe);
              }
          }
      }
docs: {@inheritDoc}
  
  @see org.jboss.shrinkwrap.api.exporter.StreamExporter#exportTo(java.io.OutputStream)