Home / Function/ sliceOfCompositeBufferMustThrowISEAfterDiscardBytes() — netty Function Reference

sliceOfCompositeBufferMustThrowISEAfterDiscardBytes() — netty Function Reference

Architecture documentation for the sliceOfCompositeBufferMustThrowISEAfterDiscardBytes() function in AbstractCompositeByteBufTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  2ef1dc28_3683_da21_d7e7_ac0ed841ad83["sliceOfCompositeBufferMustThrowISEAfterDiscardBytes()"]
  47bc0a20_e243_89ff_132b_99ac6b23835f["AbstractCompositeByteBufTest"]
  2ef1dc28_3683_da21_d7e7_ac0ed841ad83 -->|defined in| 47bc0a20_e243_89ff_132b_99ac6b23835f
  style 2ef1dc28_3683_da21_d7e7_ac0ed841ad83 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buffer/src/test/java/io/netty/buffer/AbstractCompositeByteBufTest.java lines 1759–1777

    @Test
    public void sliceOfCompositeBufferMustThrowISEAfterDiscardBytes() {
        CompositeByteBuf composite = compositeBuffer();
        composite.addComponent(true, buffer(8).writeZero(8));

        ByteBuf slice = composite.retainedSlice();
        composite.skipBytes(slice.readableBytes());
        composite.discardSomeReadBytes();

        try {
            slice.readByte();
            fail("Expected readByte of discarded slice to throw.");
        } catch (IllegalStateException ignore) {
            // Good.
        } finally {
            slice.release();
            composite.release();
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does sliceOfCompositeBufferMustThrowISEAfterDiscardBytes() do?
sliceOfCompositeBufferMustThrowISEAfterDiscardBytes() is a function in the netty codebase, defined in buffer/src/test/java/io/netty/buffer/AbstractCompositeByteBufTest.java.
Where is sliceOfCompositeBufferMustThrowISEAfterDiscardBytes() defined?
sliceOfCompositeBufferMustThrowISEAfterDiscardBytes() is defined in buffer/src/test/java/io/netty/buffer/AbstractCompositeByteBufTest.java at line 1759.

Analyze Your Own Codebase

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

Try Supermodel Free