Class CompressionNone
java.lang.Object
org.apache.sshd.common.compression.BaseCompression
org.apache.sshd.common.compression.CompressionNone
- All Implemented Interfaces:
Compression
,CompressionInformation
,NamedResource
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.sshd.common.compression.Compression
Compression.Type
-
Field Summary
FieldsFields inherited from interface org.apache.sshd.common.NamedResource
BY_NAME_COMPARATOR, NAME_EXTRACTOR
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Compress the given buffer in place.void
init
(Compression.Type type, int level) Initialize this object to either compress or uncompress data.boolean
boolean
Delayed compression is an Open-SSH specific feature which informs both the client and server to not compress data before the session has been authenticated.toString()
void
uncompress
(Buffer from, Buffer to) Uncompress the data in a buffer into another buffer.Methods inherited from class org.apache.sshd.common.compression.BaseCompression
getName
-
Field Details
-
type
-
level
private int level
-
-
Constructor Details
-
CompressionNone
public CompressionNone()
-
-
Method Details
-
init
Description copied from interface:Compression
Initialize this object to either compress or uncompress data. This method must be called prior to any calls to eithercompress
oruncompress
. Once the object has been initialized, only one ofcompress
oruncompress
methods can be called.- Parameters:
type
- compression typelevel
- compression level
-
isCompressionExecuted
public boolean isCompressionExecuted()- Specified by:
isCompressionExecuted
in interfaceCompressionInformation
- Overrides:
isCompressionExecuted
in classBaseCompression
- Returns:
true
if there is any compression executed by this "compressor" - special case for 'none'
-
compress
Description copied from interface:Compression
Compress the given buffer in place.- Parameters:
buffer
- the buffer containing the data to compress- Throws:
IOException
- if an error occurs
-
uncompress
Description copied from interface:Compression
Uncompress the data in a buffer into another buffer.- Parameters:
from
- the buffer containing the data to uncompressto
- the buffer receiving the uncompressed data- Throws:
IOException
- if an error occurs
-
isDelayed
public boolean isDelayed()Description copied from interface:CompressionInformation
Delayed compression is an Open-SSH specific feature which informs both the client and server to not compress data before the session has been authenticated.- Returns:
- if the compression is delayed after authentication or not
-
toString
- Overrides:
toString
in classBaseCompression
-