|
||||||||||
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(java.io.PrintStream out)
|
Method Summary | |
---|---|
void |
notifyCompletion(java.net.URL resource)
Notify the monitor of the successful completion of a download process. |
void |
notifyError(java.net.URL resource,
java.lang.String message)
Notify the monitor of the an error during the download process. |
void |
notifyUpdate(java.net.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(java.io.PrintStream out)
out
- The PrintStream that should receive the monitored output.Method Detail |
---|
public void notifyUpdate(java.net.URL resource, int expected, int count)
notifyUpdate
in interface StreamMonitor
resource
- 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(java.net.URL resource)
notifyCompletion
in interface StreamMonitor
resource
- the name of the remote resource.public void notifyError(java.net.URL resource, java.lang.String message)
notifyError
in interface StreamMonitor
resource
- 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 |