Package java.util.zip

Examples of java.util.zip.Inflater.end()


          if (data[0] == 0x78 /* 'x' */) {
            Inflater zlib = new Inflater();
            zlib.setInput(data, 0, compressedLen);
            byte[] result = new byte[actualLen * 3];
            int resultLen = zlib.inflate(result);
            zlib.end();
            data = result;
            dataOffset = 0;
            dataLen = resultLen;
          } else if (data[0] == 0x75 /* 'u' */) {
            dataOffset = 1;
View Full Code Here


                       
                        if (decompressor.finished())
                            break;
                    }
                   
                    decompressor.end();
                   
                    queryString = new String(byteArray.toByteArray(), 0, byteArray.size(), "UTF-8");
                    break;
                case NONE:
                    try
View Full Code Here

                       
                        if (decompressor.finished())
                            break;
                    }
                   
                    decompressor.end();
                   
                    queryString = new String(byteArray.toByteArray(), 0, byteArray.size(), "UTF-8");
                    break;
                case NONE:
                    try
View Full Code Here

            } catch (DataFormatException e) {
                // there was an error decompressing the first 100 bytes,
                // so we assume the "gzip/raw"-variant was used.
                result = new InflaterInputStream(bStream, new Inflater(true));
            } finally {
                inflater.end();
            }
        } else {
            result = in;
        }
View Full Code Here

                        if (decompressor.finished())
                            break;
                    }

                    decompressor.end();

                    queryString = new String(decompressed.getData(), 0, decompressed.size(), "UTF-8");
                    break;
                case NONE:
                    try
View Full Code Here

                    } catch (DataFormatException e) {
                        log.debug("Failed to deflate ICC Profile", e);
                        failed = true;
                    }
                }
                decompresser.end();
                try {
                    iccProf = ColorProfileUtil.getICC_Profile(bos.toByteArray());
                } catch (IllegalArgumentException e) {
                    log.debug("Failed to interpret embedded ICC Profile", e);
                    iccProf = null;
View Full Code Here

                        if (decompressor.finished())
                            break;
                    }

                    decompressor.end();

                    queryString = new String(decompressed.getData(), 0, decompressed.size(), "UTF-8");
                    break;
                case NONE:
                    try
View Full Code Here

        // Regression for HARMONY-2508
        Inflater inflater = new Inflater();
        byte[] b = new byte[1024];
        assertEquals(0, inflater.inflate(b));
        inflater.end();

        // Regression for HARMONY-2510
        inflater = new Inflater();
        inflater.setInput(new byte[] { -1 });
        try {
View Full Code Here

        decLen = infl2.inflate(result);

        assertTrue(infl2.needsDictionary());
        infl2.setDictionary(dictionary2.getBytes());
        decLen = infl2.inflate(result);
        infl2.end();
        assertEquals(inputString, new String(result, 0, decLen));


        inflNo = new Inflater();
        infl1 = new Inflater();
View Full Code Here

        decLen = infl3.inflate(result);

        assertTrue(infl3.needsDictionary());
        infl3.setDictionary(dictionary1.getBytes());
        decLen = infl3.inflate(result);
        infl3.end();
        assertEquals(inputString, new String(result, 0, decLen));

    }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.