示例#1
0
        public void testCorrupt()
        {
            ByteBuffer buf = ByteBuffer.allocate(1000);

            buf.put(new byte[] { 127, unchecked ((byte)-128), 0, 99, 98, unchecked ((byte)-1) });
            buf.flip();
            CompressionCodec codec = new ZlibCodec();
            ByteBuffer       @out  = ByteBuffer.allocate(1000);

            try
            {
                codec.decompress(buf, @out);
                fail();
            }
            catch (IOException ioe)
            {
                // EXPECTED
            }
        }