197 |
/** |
/** |
198 |
* Decodes the deflate header. |
* Decodes the deflate header. |
199 |
* @return false if more input is needed. |
* @return false if more input is needed. |
200 |
* @exception DataFormatException, if header is invalid. |
* @exception DataFormatException if header is invalid. |
201 |
*/ |
*/ |
202 |
private boolean decodeHeader() throws DataFormatException |
private boolean decodeHeader() throws DataFormatException |
203 |
{ |
{ |
255 |
* Decodes the huffman encoded symbols in the input stream. |
* Decodes the huffman encoded symbols in the input stream. |
256 |
* @return false if more input is needed, true if output window is |
* @return false if more input is needed, true if output window is |
257 |
* full or the current block ends. |
* full or the current block ends. |
258 |
* @exception DataFormatException, if deflated stream is invalid. |
* @exception DataFormatException if deflated stream is invalid. |
259 |
*/ |
*/ |
260 |
private boolean decodeHuffman() throws DataFormatException |
private boolean decodeHuffman() throws DataFormatException |
261 |
{ |
{ |
347 |
/** |
/** |
348 |
* Decodes the adler checksum after the deflate stream. |
* Decodes the adler checksum after the deflate stream. |
349 |
* @return false if more input is needed. |
* @return false if more input is needed. |
350 |
* @exception DataFormatException, if checksum doesn't match. |
* @exception DataFormatException if checksum doesn't match. |
351 |
*/ |
*/ |
352 |
private boolean decodeChksum() throws DataFormatException |
private boolean decodeChksum() throws DataFormatException |
353 |
{ |
{ |
371 |
/** |
/** |
372 |
* Decodes the deflated stream. |
* Decodes the deflated stream. |
373 |
* @return false if more input is needed, or if finished. |
* @return false if more input is needed, or if finished. |
374 |
* @exception DataFormatException, if deflated stream is invalid. |
* @exception DataFormatException if deflated stream is invalid. |
375 |
*/ |
*/ |
376 |
private boolean decode() throws DataFormatException |
private boolean decode() throws DataFormatException |
377 |
{ |
{ |
553 |
* @param buffer the output buffer. |
* @param buffer the output buffer. |
554 |
* @return the number of bytes written to the buffer, 0 if no further |
* @return the number of bytes written to the buffer, 0 if no further |
555 |
* output can be produced. |
* output can be produced. |
556 |
* @exception DataFormatException, if deflated stream is invalid. |
* @exception DataFormatException if deflated stream is invalid. |
557 |
* @exception IllegalArgumentException, if buf has length 0. |
* @exception IllegalArgumentException if buf has length 0. |
558 |
*/ |
*/ |
559 |
public int inflate(byte[] buf) throws DataFormatException |
public int inflate(byte[] buf) throws DataFormatException |
560 |
{ |
{ |
571 |
* @param len the maximum length of the output. |
* @param len the maximum length of the output. |
572 |
* @return the number of bytes written to the buffer, 0 if no further |
* @return the number of bytes written to the buffer, 0 if no further |
573 |
* output can be produced. |
* output can be produced. |
574 |
* @exception DataFormatException, if deflated stream is invalid. |
* @exception DataFormatException if deflated stream is invalid. |
575 |
* @exception IllegalArgumentException, if len is <= 0. |
* @exception IllegalArgumentException if len is lt;eq; 0. |
576 |
* @exception IndexOutOfBoundsException if the off and/or len are wrong. |
* @exception IndexOutOfBoundsException if the off and/or len are wrong. |
577 |
*/ |
*/ |
578 |
public int inflate(byte[] buf, int off, int len) throws DataFormatException |
public int inflate(byte[] buf, int off, int len) throws DataFormatException |