|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.device.api.io.parser.GUNZIPMessageProcessor
public class GUNZIPMessageProcessor
This MessageProcessor unzips the body
of a Message and updates the body with the uncompressed version.
It works on byte arrays and InputStream objects. The process
method de-compresses an entire byte array and stores the result as a byte array.
The chain method updates the InputStream with the
Message object's body and wraps it with a GZIPInputStream.
This allows the bytes in the stream to be un-zipped on the fly as they are
read by an application.
| Constructor Summary | ||
|---|---|---|
GUNZIPMessageProcessor()
Constructs a GUNZIPMessageProcessor. |
||
| Method Summary | ||
|---|---|---|
InputStream |
chain(InputStream stream)
Wraps the InputStream specified with a GZIPInputStream. |
|
void |
process(Message message)
Reads the body of a Message, unzips
the data, and updates the body of the message with the resulting
de-compressed data. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GUNZIPMessageProcessor()
GUNZIPMessageProcessor.
| Method Detail |
|---|
public void process(Message message)
throws MessageProcessorException
Message, unzips
the data, and updates the body of the message with the resulting
de-compressed data. If the message body is very large, you should use the
chain method instead.
process in interface MessageProcessormessage - Message to process.
MessageProcessorException - If any problems occur during the unzipping process.public InputStream chain(InputStream stream)
InputStream specified with a GZIPInputStream.
It can be used to update a Message objects's body
InputStream with one that un-zips the message body as the bytes are read from
the stream. This is the preferred approach if the message body is large.
chain in interface ChainableMessageProcessorstream - InputStream to wrap.
InputStream that un-zips the original InputStream.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.