Home / Function/ testBadBlockHeader() — netty Function Reference

testBadBlockHeader() — netty Function Reference

Architecture documentation for the testBadBlockHeader() function in Bzip2DecoderTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  e2389c34_f2e9_6a0d_73df_be15b2f6d25e["testBadBlockHeader()"]
  53eb2ef4_6844_0384_3483_6c7a17c214e0["Bzip2DecoderTest"]
  e2389c34_f2e9_6a0d_73df_be15b2f6d25e -->|defined in| 53eb2ef4_6844_0384_3483_6c7a17c214e0
  style e2389c34_f2e9_6a0d_73df_be15b2f6d25e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-compression/src/test/java/io/netty/handler/codec/compression/Bzip2DecoderTest.java lines 88–103

    @Test
    public void testBadBlockHeader() {
        final ByteBuf in = Unpooled.buffer();
        in.writeMedium(MAGIC_NUMBER);
        in.writeByte('1');  //block size
        in.writeMedium(11); //incorrect block header
        in.writeMedium(11); //incorrect block header
        in.writeInt(11111); //block CRC

        assertThrows(DecompressionException.class, new Executable() {
            @Override
            public void execute() {
                channel.writeInbound(in);
            }
        }, "bad block header");
    }

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free