# Class: com.pnfsoftware.jeb.util.io.StreamWrappers

Convenient stream wrappers to encrypt or compress data. Currently supported: LZ4 compression, RC4 encryption.

## Constructor: StreamWrappers


## Static Method: getCompressedStream
- parameter: `out`, type: `java.io.OutputStream`
- return type: `java.io.FilterOutputStream`

Description: LZ4 compression.
parameter: out: wrapped output stream
return: an output stream performing on\-write LZ4 compression

## Static Method: getDecryptedStream
- parameter: `in`, type: `java.io.InputStream`
- parameter: `key`, type: `byte[]`
- return type: `java.io.FilterInputStream`

Description: RC4 encryption.
parameter: in: wrapped input stream
parameter: key: RC4 key bytes
return: an input stream performing on\-read RC4 decryption

## Static Method: getDecryptedStream
- parameter: `in`, type: `java.io.InputStream`
- parameter: `key`, type: `byte[]`
- parameter: `favorJavaxImpl`, type: `boolean`
- return type: `java.io.FilterInputStream`

Description: RC4 encryption.
parameter: in: wrapped input stream
parameter: key: RC4 key bytes
parameter: favorJavaxImpl: use the JDK implementation if available
return: an input stream performing on\-read RC4 decryption

## Static Method: getDecryptedStream
- parameter: `in`, type: `java.io.InputStream`
- parameter: `algo`, type: `java.lang.String`
- parameter: `key`, type: `byte[]`
- return type: `java.io.FilterInputStream`

Description: Create an input stream that will read encrypted data.
parameter: in: wrapped input stream
parameter: algo: cipher algorithm
parameter: key: key bytes
return: an input stream performing on\-read decryption
throws: 

## Static Method: getEncryptedStream
- parameter: `out`, type: `java.io.OutputStream`
- parameter: `key`, type: `byte[]`
- return type: `java.io.FilterOutputStream`

Description: RC4 encryption.
parameter: out: wrapped output stream
parameter: key: RC4 key bytes
parameter: favorJavaxImpl: 
return: an output stream performing on\-write RC4 encryption

## Static Method: getEncryptedStream
- parameter: `out`, type: `java.io.OutputStream`
- parameter: `key`, type: `byte[]`
- parameter: `favorJavaxImpl`, type: `boolean`
- return type: `java.io.FilterOutputStream`

Description: RC4 encryption.
parameter: out: wrapped output stream
parameter: key: RC4 key bytes
parameter: favorJavaxImpl: use the JDK implementation if available
return: an output stream performing on\-write RC4 encryption

## Static Method: getEncryptedStream
- parameter: `out`, type: `java.io.OutputStream`
- parameter: `algo`, type: `java.lang.String`
- parameter: `key`, type: `byte[]`
- return type: `java.io.FilterOutputStream`

Description: Create an output stream that will write encrypted data.
parameter: out: wrapped output stream
parameter: algo: cipher algorithm
parameter: key: key bytes
return: an output stream performing on\-write encryption
throws: 

## Static Method: getUncompressedStream
- parameter: `in`, type: `java.io.InputStream`
- return type: `java.io.FilterInputStream`

Description: LZ4 compression.
parameter: in: wrapped input stream
return: an input stream performing on\-read LZ4 decompression

