public class

StreamWrappers

extends Object
java.lang.Object
   ↳ com.pnfsoftware.jeb.util.io.StreamWrappers

Class Overview

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

Summary

Public Constructors
StreamWrappers()
Public Methods
static FilterOutputStream getCompressedStream(OutputStream out)
LZ4 compression.
static FilterInputStream getDecryptedStream(InputStream in, byte[] key)
RC4 encryption.
static FilterInputStream getDecryptedStream(InputStream in, String algo, byte[] key)
User-selectable encryption.
static FilterOutputStream getEncryptedStream(OutputStream out, byte[] key)
RC4 encryption.
static FilterOutputStream getEncryptedStream(OutputStream out, String algo, byte[] key)
User-selectable encryption.
static FilterInputStream getUncompressedStream(InputStream in)
LZ4 compression.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public StreamWrappers ()

Public Methods

public static FilterOutputStream getCompressedStream (OutputStream out)

LZ4 compression.

Returns
  • an output stream performing on-write LZ4 compression

public static FilterInputStream getDecryptedStream (InputStream in, byte[] key)

RC4 encryption.

Returns
  • an input stream performing on-read RC4 decryption

public static FilterInputStream getDecryptedStream (InputStream in, String algo, byte[] key)

User-selectable encryption.

Returns
  • an input stream performing on-read decryption

public static FilterOutputStream getEncryptedStream (OutputStream out, byte[] key)

RC4 encryption.

Returns
  • an output stream performing on-write RC4 encryption

public static FilterOutputStream getEncryptedStream (OutputStream out, String algo, byte[] key)

User-selectable encryption.

Returns
  • an output stream performing on-write encryption

public static FilterInputStream getUncompressedStream (InputStream in)

LZ4 compression.

Returns
  • an input stream performing on-read LZ4 decompression