ShrinkWrap Resolver Maven Implementation 2.0.0-alpha-4

org.jboss.shrinkwrap.resolver.impl.maven.util
Class IOUtil

java.lang.Object
  extended by org.jboss.shrinkwrap.resolver.impl.maven.util.IOUtil

public final class IOUtil
extends Object

Generic input/output utilities

Version:
$Revision: $
Author:
ALR

Method Summary
static void copy(InputStream input, OutputStream output)
          Copies the contents from an InputStream to an OutputStream.
static void copyWithClose(InputStream input, OutputStream output)
          Copies the contents from an InputStream to an OutputStream and closes both streams.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

copy

public static void copy(InputStream input,
                        OutputStream output)
                 throws IOException
Copies the contents from an InputStream to an OutputStream. It is the responsibility of the caller to close the streams passed in when done, though the OutputStream will be fully flushed.

Parameters:
input -
output -
Throws:
IOException - If a problem occurred during any I/O operations

copyWithClose

public static void copyWithClose(InputStream input,
                                 OutputStream output)
                          throws IOException
Copies the contents from an InputStream to an OutputStream and closes both streams.

Parameters:
input -
output -
Throws:
IOException - If a problem occurred during any I/O operations during the copy, but on closing the streams these will be ignored and logged at Level.FINER

ShrinkWrap Resolver Maven Implementation 2.0.0-alpha-4

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.