Package com.pixelmed.transfermonitor

# Class MonitoredOutputStream

java.lang.Object
java.io.OutputStream
com.pixelmed.transfermonitor.MonitoredOutputStream

All Implemented Interfaces:
  `Closeable`, `Flushable`, `AutoCloseable`

public class MonitoredOutputStream extends OutputStream

A class that extends `OutputStream` to track statistics on the transfers.

## Constructor Summary

Constructors
Constructor
Description
`MonitoredOutputStream(OutputStream out, TransferMonitoringContext transferMonitoringContext)`

## Method Summary

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

### Methods inherited from class java.io.OutputStream

`nullOutputStream`

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

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

## Constructor Details

### MonitoredOutputStream

public MonitoredOutputStream(OutputStream out, TransferMonitoringContext transferMonitoringContext)

## Method Details

### close

public final void close() throws IOException

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

### flush

public final void flush() throws IOException

Specified by:
  `flush` in interface `Flushable`
Overrides:
  `flush` in class `OutputStream`
Throws:
  `IOException`

### write

public final void write(byte[] b) throws IOException

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

### write

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

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

### write

public final void write(int b) throws IOException

Specified by:
  `write` in class `OutputStream`
Throws:
  `IOException`