com.maverick.ssh.components
Class NoneCompression
java.lang.Object
com.maverick.ssh.components.NoneCompression
- All Implemented Interfaces:
- SshComponent, SshCompression
public class NoneCompression
- extends java.lang.Object
- implements SshCompression
|
Method Summary |
byte[] |
compress(byte[] data,
int start,
int len)
Compress a block of data. |
java.lang.String |
getName()
Get the algorithm name for this compression implementation. |
void |
init(int type,
int level)
Initialize the compression. |
byte[] |
uncompress(byte[] data,
int start,
int len)
Uncompress a block of data. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NoneCompression
public NoneCompression()
init
public void init(int type,
int level)
- Description copied from interface:
SshCompression
- Initialize the compression.
- Specified by:
init in interface SshCompression
- Parameters:
type - the mode of the compression, should be either INFLATER or DEFLATERlevel - the level of compression
compress
public byte[] compress(byte[] data,
int start,
int len)
throws java.io.IOException
- Description copied from interface:
SshCompression
- Compress a block of data.
- Specified by:
compress in interface SshCompression
- Parameters:
data - the data to compressstart - the offset of the data to compresslen - the length of the data
- Returns:
- the compressed data with any uncompressed data at the start
remaining intact.
- Throws:
java.io.IOException
uncompress
public byte[] uncompress(byte[] data,
int start,
int len)
throws java.io.IOException
- Description copied from interface:
SshCompression
- Uncompress a block of data.
- Specified by:
uncompress in interface SshCompression
- Parameters:
data - the data to uncompressstart - the offset of the data to uncompresslen - the length of the data
- Returns:
- the uncompressed data with any data not compressed at the start
remaining intact.
- Throws:
java.io.IOException
getName
public java.lang.String getName()
- Description copied from interface:
SshCompression
- Get the algorithm name for this compression implementation.
- Specified by:
getName in interface SshComponent- Specified by:
getName in interface SshCompression
- Returns:
- the algorithm name.
Copyright © 2012. All Rights Reserved.