iaik.security.ssl
Class CompressionMethod
java.lang.Object
|
+--iaik.security.ssl.CompressionMethod
- Direct Known Subclasses:
- NullCompression
- public abstract class CompressionMethod
- extends java.lang.Object
Defines the compression methods supported in SSL Version 3.0.
SSL v3.0 does not define any standard compression methods but allows
user defined compression methods.
|
Constructor Summary |
protected |
CompressionMethod(java.lang.String name,
int id)
This constructor is called from a class which implements
a specific compression method. |
|
Method Summary |
protected abstract int |
compress(byte[] in,
int inOff,
int inLen,
byte[] out,
int outOff)
Performs the compress operation. |
protected abstract int |
decompress(byte[] in,
int inOff,
int inLen,
byte[] out,
int outOff)
Performs the decompress operation. |
static CompressionMethod[] |
getDefault()
Returns an array with the default compression methods. |
int |
getID()
Returns the identifier of this compression method. |
java.lang.String |
getName()
Returns the name of this compression method. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
NULL_COMPRESSION
public static final CompressionMethod NULL_COMPRESSION
CompressionMethod
protected CompressionMethod(java.lang.String name,
int id)
- This constructor is called from a class which implements
a specific compression method.
getName
public final java.lang.String getName()
- Returns the name of this compression method.
- Returns:
- the name of this compression method
getID
public final int getID()
- Returns the identifier of this compression method.
- Returns:
- the identifier of this compression method
compress
protected abstract int compress(byte[] in,
int inOff,
int inLen,
byte[] out,
int outOff)
throws java.util.zip.DataFormatException
- Performs the compress operation. Implemented by a subclass.
- Parameters:
in - the byte array holding the data to be processedinOff - the offset indicating the start position within the in byte arrayinLen - the number of bytes to be processedout - the byte array for holding the resultoutOff - the offset indicating the start position within the out byte array- Returns:
- the number of bytes that are stored in the out byte array
decompress
protected abstract int decompress(byte[] in,
int inOff,
int inLen,
byte[] out,
int outOff)
throws java.util.zip.DataFormatException
- Performs the decompress operation. Implemented by a subclass.
- Parameters:
in - the byte array holding the data to be processedinOff - the offset indicating the start position within the in byte arrayinLen - the number of bytes to be processedout - the byte array for holding the resultoutOff - the offset indicating the start position within the out byte array- Returns:
- the number of bytes that are stored in the out byte array
getDefault
public static CompressionMethod[] getDefault()
- Returns an array with the default compression methods. Currently
this is always an array with NullCompression as its only element.
- Returns:
- an array with the default compression methods
toString
public java.lang.String toString()
- Overrides:
- toString in class java.lang.Object