testStreamStartIsOnlyWrittenOnce() — netty Function Reference
Architecture documentation for the testStreamStartIsOnlyWrittenOnce() function in SnappyFrameEncoderTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD e4300c58_d4f6_ba43_6eac_dae6be335876["testStreamStartIsOnlyWrittenOnce()"] 7bf4ca4f_ca32_181e_5b9a_f9630200b493["SnappyFrameEncoderTest"] e4300c58_d4f6_ba43_6eac_dae6be335876 -->|defined in| 7bf4ca4f_ca32_181e_5b9a_f9630200b493 style e4300c58_d4f6_ba43_6eac_dae6be335876 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-compression/src/test/java/io/netty/handler/codec/compression/SnappyFrameEncoderTest.java lines 78–107
@Test
public void testStreamStartIsOnlyWrittenOnce() throws Exception {
ByteBuf in = Unpooled.wrappedBuffer(new byte[] {
'n', 'e', 't', 't', 'y'
});
channel.writeOutbound(in.retain());
in.resetReaderIndex(); // rewind the buffer to write the same data
channel.writeOutbound(in);
assertTrue(channel.finish());
ByteBuf expected = Unpooled.wrappedBuffer(new byte[] {
(byte) 0xff, 0x06, 0x00, 0x00, 0x73, 0x4e, 0x61, 0x50, 0x70, 0x59,
0x01, 0x09, 0x00, 0x00, 0x6f, -0x68, 0x2e, -0x47, 'n', 'e', 't', 't', 'y',
0x01, 0x09, 0x00, 0x00, 0x6f, -0x68, 0x2e, -0x47, 'n', 'e', 't', 't', 'y',
});
CompositeByteBuf actual = Unpooled.compositeBuffer();
for (;;) {
ByteBuf m = channel.readOutbound();
if (m == null) {
break;
}
actual.addComponent(true, m);
}
assertEquals(expected, actual);
expected.release();
actual.release();
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does testStreamStartIsOnlyWrittenOnce() do?
testStreamStartIsOnlyWrittenOnce() is a function in the netty codebase, defined in codec-compression/src/test/java/io/netty/handler/codec/compression/SnappyFrameEncoderTest.java.
Where is testStreamStartIsOnlyWrittenOnce() defined?
testStreamStartIsOnlyWrittenOnce() is defined in codec-compression/src/test/java/io/netty/handler/codec/compression/SnappyFrameEncoderTest.java at line 78.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free