Package net.shibboleth.idp.installer
Class ProgressReportingOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
java.io.BufferedOutputStream
net.shibboleth.idp.installer.ProgressReportingOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
A version of
BufferedOutputStream which provides some idea of progress.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intHow much to transfer before we note it.private booleanDo we need to output a terminateing newline?private intHow much have we written so far?Fields inherited from class java.io.BufferedOutputStream
buf, countFields inherited from class java.io.FilterOutputStream
out -
Constructor Summary
ConstructorsConstructorDescriptionProgressReportingOutputStream(OutputStream outStream) Constructor.ProgressReportingOutputStream(OutputStream outStream, int size) Constructor. -
Method Summary
Methods inherited from class java.io.BufferedOutputStream
flush, writeMethods inherited from class java.io.FilterOutputStream
writeMethods inherited from class java.io.OutputStream
nullOutputStream
-
Field Details
-
PROGRESS_EVERY
private static final int PROGRESS_EVERYHow much to transfer before we note it.- See Also:
-
written
private int writtenHow much have we written so far? -
terminate
private boolean terminateDo we need to output a terminateing newline?
-
-
Constructor Details
-
ProgressReportingOutputStream
Constructor.- Parameters:
outStream- what to bracket.
-
ProgressReportingOutputStream
Constructor.- Parameters:
outStream- what to bracket.size- buffer size
-
-
Method Details
-
write
- Overrides:
writein classBufferedOutputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterOutputStream- Throws:
IOException
-