|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ops4j.io.PrintStreamMonitor
public class PrintStreamMonitor
PrintStreamMonitor is a convenience implementation of the StreamMonitor for output to
a PrintStream, such as System.out.
StreamMonitor monitor = new PrintStreamMonitor( System.out );
StreamUtils.copyStream( monitor, sourceURL, length, srcStream, destStream, true );
| Constructor Summary | |
|---|---|
PrintStreamMonitor(PrintStream out)
|
|
| Method Summary | |
|---|---|
void |
notifyCompletion(URL resource)
Notify the monitor of the successful completion of a download process. |
void |
notifyError(URL resource,
String message)
Notify the monitor of the an error during the download process. |
void |
notifyUpdate(URL resource,
int expected,
int count)
Notify the monitor of the update in the download status. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PrintStreamMonitor(PrintStream out)
out - The PrintStream that should receive the monitored output.| Method Detail |
|---|
public void notifyUpdate(URL resource,
int expected,
int count)
notifyUpdate in interface StreamMonitorresource - the name of the remote resource being downloaded.expected - the expected number of bytes to be downloaded.count - the number of bytes downloaded.public void notifyCompletion(URL resource)
notifyCompletion in interface StreamMonitorresource - the name of the remote resource.
public void notifyError(URL resource,
String message)
notifyError in interface StreamMonitorresource - the name of the remote resource.message - a non-localized message describing the problem in english.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||