com.maverick.ssh.components
Class NoneCompression

java.lang.Object
  extended by com.maverick.ssh.components.NoneCompression
All Implemented Interfaces:
SshComponent, SshCompression

public class NoneCompression
extends Object
implements SshCompression


Field Summary
 
Fields inherited from interface com.maverick.ssh.components.SshCompression
DEFLATER, INFLATER
 
Constructor Summary
NoneCompression()
           
 
Method Summary
 byte[] compress(byte[] data, int start, int len)
          Compress a block of data.
 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
 

Constructor Detail

NoneCompression

public NoneCompression()
Method Detail

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 DEFLATER
level - the level of compression

compress

public byte[] compress(byte[] data,
                       int start,
                       int len)
                throws IOException
Description copied from interface: SshCompression
Compress a block of data.

Specified by:
compress in interface SshCompression
Parameters:
data - the data to compress
start - the offset of the data to compress
len - the length of the data
Returns:
the compressed data with any uncompressed data at the start remaining intact.
Throws:
IOException

uncompress

public byte[] uncompress(byte[] data,
                         int start,
                         int len)
                  throws IOException
Description copied from interface: SshCompression
Uncompress a block of data.

Specified by:
uncompress in interface SshCompression
Parameters:
data - the data to uncompress
start - the offset of the data to uncompress
len - the length of the data
Returns:
the uncompressed data with any data not compressed at the start remaining intact.
Throws:
IOException

getName

public 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.