public class

StreamUtils

extends Object
java.lang.Object
   ↳ org.ops4j.pax.exam.forked.provision.StreamUtils

Class Overview

Stream related utilities. TODO add units tests

Summary

Nested Classes
class StreamUtils.CoarseGrainedProgressBar A progress bar that displayed corse grained information about downloading of an artifact  
class StreamUtils.FineGrainedProgressBar A progress bar that displayed detailed information about downloading of an artifact  
class StreamUtils.NullProgressBar A progress bar that does nothing = does not display anything on console. 
interface StreamUtils.ProgressBar Feddback for downloading process. 
Public Methods
static void streamCopy(InputStream in, FileChannel out, StreamUtils.ProgressBar progressBar)
Copy a stream to a destination.
static void streamCopy(URL url, FileChannel out, StreamUtils.ProgressBar progressBar)
Copy a stream from an urlto a destination.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static void streamCopy (InputStream in, FileChannel out, StreamUtils.ProgressBar progressBar)

Copy a stream to a destination. It does not close the streams.

Parameters
in the stream to copy from
out the stream to copy to
progressBar download progress feedback. Can be null.
Throws
IOException re-thrown

public static void streamCopy (URL url, FileChannel out, StreamUtils.ProgressBar progressBar)

Copy a stream from an urlto a destination.

Parameters
url the url to copy from
out the stream to copy to
progressBar download progress feedback. Can be null.
Throws
IOException re-thrown