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`

public class ProgressReportingOutputStream extends BufferedOutputStream
A version of `BufferedOutputStream` which provides some idea of progress.

## Field Summary

Fields
Modifier and Type
Field
Description
`private static final int`
`PROGRESS_EVERY`
How much to transfer before we note it.
`private boolean`
`terminate`
Do we need to output a terminateing newline?
`private int`
`written`
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

Constructors
Constructor
Description
`ProgressReportingOutputStream(OutputStream outStream)`
Constructor.
`ProgressReportingOutputStream(OutputStream outStream, int size)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`void`
`close()`
`void`
`write(byte[] b, int off, int len)`

### 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`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### PROGRESS_EVERY

private static final int PROGRESS_EVERY
How much to transfer before we note it.

See Also:
  - Constant Field Values

### written

private int written
How much have we written so far?

### terminate

private boolean terminate
Do we need to output a terminateing newline?

## Constructor Details

### ProgressReportingOutputStream

public ProgressReportingOutputStream(@Nonnull OutputStream outStream)
Constructor.

Parameters:
  `outStream` - what to bracket.

### ProgressReportingOutputStream

public ProgressReportingOutputStream(@Nonnull OutputStream outStream, int size)
Constructor.

Parameters:
  `outStream` - what to bracket.
  `size` - buffer size

## Method Details

### write

public void write(byte[] b, int off, int len) throws IOException

Overrides:
  `write` in class `BufferedOutputStream`
Throws:
  `IOException`

### close

public void close() throws IOException

Specified by:
  `close` in interface `AutoCloseable`
Specified by:
  `close` in interface `Closeable`
Overrides:
  `close` in class `FilterOutputStream`
Throws:
  `IOException`