Package org.openstreetmap.josm.io
Class ProgressOutputStream
java.lang.Object
java.io.OutputStream
org.openstreetmap.josm.io.ProgressOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
An
OutputStream which reports progress to the ProgressMonitor.- Since:
- 9185
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanprivate final OutputStreamprivate final StreamProgressUpdater -
Constructor Summary
ConstructorsConstructorDescriptionProgressOutputStream(OutputStream out, long size, ProgressMonitor progressMonitor, boolean finishOnClose) Constructs a newProgressOutputStream.ProgressOutputStream(OutputStream out, long size, ProgressMonitor progressMonitor, String message, boolean finishOnClose) Constructs a newProgressOutputStream. -
Method Summary
Methods inherited from class java.io.OutputStream
flush, nullOutputStream, write
-
Field Details
-
updater
-
out
-
finishOnClose
-
-
Constructor Details
-
ProgressOutputStream
public ProgressOutputStream(OutputStream out, long size, ProgressMonitor progressMonitor, boolean finishOnClose) Constructs a newProgressOutputStream.- Parameters:
out- the stream to monitorsize- the total size which will be sentprogressMonitor- the monitor to report tofinishOnClose- whether to callProgressMonitor.finishTask()when this stream is closed- Since:
- 10302
-
ProgressOutputStream
public ProgressOutputStream(OutputStream out, long size, ProgressMonitor progressMonitor, String message, boolean finishOnClose) Constructs a newProgressOutputStream.- Parameters:
out- the stream to monitorsize- the total size which will be sentprogressMonitor- the monitor to report tomessage- the message that will be displayed by the innerStreamProgressUpdaterfinishOnClose- whether to callProgressMonitor.finishTask()when this stream is closed- Since:
- 12711
-
-
Method Details
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
write
- Specified by:
writein classOutputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-