com.ibm.dse.base
Class Compressor
java.lang.Object
|
+--com.ibm.dse.base.FormatElement
|
+--com.ibm.dse.base.FormatDecorator
|
+--com.ibm.dse.base.Compressor
- public class Compressor
- extends FormatDecorator
This decorator compresses its decorated String in order to reduce the decorated
string size.
- See Also:
- Serialized Form
Constructor Summary |
Compressor()
This constructor creates a Compressor object. |
Compressor(java.lang.String aName)
This constructor creates a new instance of the Compressor class,
which is obtained from the external definition files through aName. |
Method Summary |
java.lang.String |
addDecoration(java.lang.String aString)
Compresses the aString parameter and returns the compressed String. |
java.lang.Object |
initializeFrom(Tag aTag)
Initializes a Compressor with the aTag attributes. |
java.lang.String |
removeDecoration(java.lang.String aString)
Returns the uncompressed String resulting from aString. |
Vector |
toStrings()
Return a visual representation of the Compressor object. |
Methods inherited from class com.ibm.dse.base.FormatDecorator |
extract,
format,
format,
getDataElementName,
getDecorated,
getName,
isConstant,
rootDecorated,
rootDecorator,
setDecorated,
toString,
unformat,
unformat |
Methods inherited from class com.ibm.dse.base.FormatElement |
exceptionInfo,
externalizer,
format,
getExternalizer,
getTagName,
isCacheable,
readExternal,
readExternal,
readObject,
reinitialize,
removeExternal,
setDataElementName,
setExternalizer,
setName,
setSize,
toTags,
unformat,
writeExternal,
writeExternal |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
DEFAULT_COMPRESSION
public static final byte DEFAULT_COMPRESSION
DEFAULT_BUFFER_SIZE
public static final int DEFAULT_BUFFER_SIZE
bufferSize
protected int bufferSize
Compressor
public Compressor()
- This constructor creates a Compressor object.
Compressor
public Compressor(java.lang.String aName)
throws java.io.IOException
- This constructor creates a new instance of the Compressor class,
which is obtained from the external definition files through aName.
- Parameters:
aName
- java.lang.String
addDecoration
public java.lang.String addDecoration(java.lang.String aString)
throws DSEInvalidArgumentException
- Compresses the aString parameter and returns the compressed String.
The compression is done like a ZIP compression using the classes provided by the package java.util.zip.
The result cannot be accessed by an external application using ZIP compression because the ZIP headers
are not included into the compressed String.
- Overrides:
- addDecoration in class FormatDecorator
initializeFrom
public java.lang.Object initializeFrom(Tag aTag)
- Initializes a Compressor with the aTag attributes.
- Overrides:
- initializeFrom in class FormatElement
- Parameters:
aTag
- com.ibm.dse.base.Tag- Returns:
- Object
removeDecoration
public java.lang.String removeDecoration(java.lang.String aString)
throws DSEInvalidArgumentException
- Returns the uncompressed String resulting from aString.
- Overrides:
- removeDecoration in class FormatDecorator
- Tags copied from class: FormatDecorator
- Parameters:
aString
- String- Returns:
- java.lang.String
toStrings
public Vector toStrings()
- Return a visual representation of the Compressor object.
- Overrides:
- toStrings in class FormatDecorator
- Tags copied from class: FormatDecorator
- Returns:
- java.lang.String