Package net.shibboleth.shared.io

# Class NoWrapAutoEndDeflaterOutputStream

java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
java.util.zip.DeflaterOutputStream
net.shibboleth.shared.io.NoWrapAutoEndDeflaterOutputStream

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

public class NoWrapAutoEndDeflaterOutputStream extends DeflaterOutputStream
A subclass of `DeflaterOutputStream` which defaults in a no-wrap `Deflater` instance and closes it when the stream is closed.

## Field Summary

### Fields inherited from class java.util.zip.DeflaterOutputStream

`buf, def`

### Fields inherited from class java.io.FilterOutputStream

`out`

## Constructor Summary

Constructors
Constructor
Description
`NoWrapAutoEndDeflaterOutputStream(OutputStream os, int level)`
Creates a new output stream with a default no-wrap compressor and buffer size, and the specified compression level.

## Method Summary

Modifier and Type
Method
Description
`void`
`close()`

### Methods inherited from class java.util.zip.DeflaterOutputStream

`deflate, finish, flush, write, 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`

## Constructor Details

### NoWrapAutoEndDeflaterOutputStream

public NoWrapAutoEndDeflaterOutputStream(@Nonnull OutputStream os, int level)
Creates a new output stream with a default no-wrap compressor and buffer size, and the specified compression level.

Parameters:
  `os` - the output stream
  `level` - the compression level (0-9)

## Method Details

### close

public void close() throws IOException

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