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 int
How much to transfer before we note it.private boolean
Do we need to output a terminateing newline?private int
How much have we written so far?Fields inherited from class java.io.BufferedOutputStream
buf, count
Fields 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, write
Methods inherited from class java.io.FilterOutputStream
write
Methods 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:
write
in classBufferedOutputStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classFilterOutputStream
- Throws:
IOException
-