Home / Function/ testGzipFooterISizeMismatchThrows() — netty Function Reference

testGzipFooterISizeMismatchThrows() — netty Function Reference

Architecture documentation for the testGzipFooterISizeMismatchThrows() function in JdkZlibTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  3c514631_26e4_46c1_f937_90cebe447358["testGzipFooterISizeMismatchThrows()"]
  4c83b538_e9fd_3b12_c32e_629bfd12e1ce["JdkZlibTest"]
  3c514631_26e4_46c1_f937_90cebe447358 -->|defined in| 4c83b538_e9fd_3b12_c32e_629bfd12e1ce
  style 3c514631_26e4_46c1_f937_90cebe447358 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-compression/src/test/java/io/netty/handler/codec/compression/JdkZlibTest.java lines 231–248

    @Test
    public void testGzipFooterISizeMismatchThrows() throws Exception {
        byte[] data = "wrong size".getBytes(CharsetUtil.UTF_8);
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        GZIPOutputStream gzipOut = new GZIPOutputStream(baos);
        gzipOut.write(data);
        gzipOut.close();

        byte[] compressed = baos.toByteArray();
        // Corrupt the ISIZE
        compressed[compressed.length - 4] ^= 0xFF;

        EmbeddedChannel ch = new EmbeddedChannel(new JdkZlibDecoder(ZlibWrapper.GZIP, Integer.MAX_VALUE));
        assertThrows(DecompressionException.class, () -> {
            ch.writeInbound(Unpooled.wrappedBuffer(compressed));
        });
        ch.finishAndReleaseAll();
    }

Domain

Subdomains

Frequently Asked Questions

What does testGzipFooterISizeMismatchThrows() do?
testGzipFooterISizeMismatchThrows() is a function in the netty codebase, defined in codec-compression/src/test/java/io/netty/handler/codec/compression/JdkZlibTest.java.
Where is testGzipFooterISizeMismatchThrows() defined?
testGzipFooterISizeMismatchThrows() is defined in codec-compression/src/test/java/io/netty/handler/codec/compression/JdkZlibTest.java at line 231.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free