Class AbstractStreamExporterImpl

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.util.logging.Logger log
      Logger
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void exportTo​(java.io.File target)
      Exports provided archive as in an implementation-specific format, written to the specified File target.
      void exportTo​(java.io.File target, boolean overwrite)
      Exports provided archive an implementation-specific format, written to the specified File target.
      void exportTo​(java.io.OutputStream target)
      Exports provided archive in an implementation-specific format, written to the specified OutputStream target.
      protected java.io.OutputStream getOutputStreamToFile​(java.io.File target, boolean overwrite)
      Obtains an OutputStream to the provided File.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.jboss.shrinkwrap.api.Assignable

        as
    • Field Detail

      • log

        private static final java.util.logging.Logger log
        Logger
    • Constructor Detail

      • AbstractStreamExporterImpl

        public AbstractStreamExporterImpl​(Archive<?> archive)
    • Method Detail

      • getOutputStreamToFile

        protected final java.io.OutputStream getOutputStreamToFile​(java.io.File target,
                                                                   boolean overwrite)
                                                            throws FileExistsException
        Obtains an OutputStream to the provided File.
        Parameters:
        target -
        overwrite - Whether we may overwrite an existing file
        Returns:
        Throws:
        FileExistsException - If the specified file exists and the overwrite flag is false
        java.lang.IllegalArgumentException - If the file target is not specified
      • exportTo

        public void exportTo​(java.io.OutputStream target)
                      throws ArchiveExportException,
                             java.lang.IllegalArgumentException
        Exports provided archive in an implementation-specific format, written to the specified OutputStream target. The specified target will not be closed or flushed; this is the responsibility of the caller (who supplied the OutputStream in the first place).
        Specified by:
        exportTo in interface StreamExporter
        Throws:
        ArchiveExportException
        java.lang.IllegalArgumentException - If the target is not specified or is closed
        See Also:
        StreamExporter.exportTo(java.io.OutputStream)