finish() — netty Function Reference
Architecture documentation for the finish() function in BrotliEncoder.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 589580a9_3e45_15df_0d67_4c020f38c2d1["finish()"] 64c539b4_9d62_5673_892e_728dc5998630["Writer"] 589580a9_3e45_15df_0d67_4c020f38c2d1 -->|defined in| 64c539b4_9d62_5673_892e_728dc5998630 5ae03be7_1763_8b14_3172_25c0da61193c["finish()"] 5ae03be7_1763_8b14_3172_25c0da61193c -->|calls| 589580a9_3e45_15df_0d67_4c020f38c2d1 d68f3978_6547_b81e_e6ff_20397d066591["close()"] d68f3978_6547_b81e_e6ff_20397d066591 -->|calls| 589580a9_3e45_15df_0d67_4c020f38c2d1 5ae03be7_1763_8b14_3172_25c0da61193c["finish()"] 589580a9_3e45_15df_0d67_4c020f38c2d1 -->|calls| 5ae03be7_1763_8b14_3172_25c0da61193c d056c373_d9ff_face_c66b_749abde43b73["allocate()"] 589580a9_3e45_15df_0d67_4c020f38c2d1 -->|calls| d056c373_d9ff_face_c66b_749abde43b73 d68f3978_6547_b81e_e6ff_20397d066591["close()"] 589580a9_3e45_15df_0d67_4c020f38c2d1 -->|calls| d68f3978_6547_b81e_e6ff_20397d066591 style 589580a9_3e45_15df_0d67_4c020f38c2d1 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-compression/src/main/java/io/netty/handler/codec/compression/BrotliEncoder.java lines 258–277
public void finish(final ChannelPromise promise) throws IOException {
if (!isClosed) {
// Allocate a buffer and write last pending data.
allocate(true);
try {
brotliEncoderChannel.close();
isClosed = true;
} catch (Exception ex) {
promise.setFailure(ex);
// Since we have already allocated Buffer for close operation,
// we will release that buffer to prevent memory leak.
ReferenceCountUtil.release(writableBuffer);
return;
}
ctx.writeAndFlush(writableBuffer, promise);
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does finish() do?
finish() is a function in the netty codebase, defined in codec-compression/src/main/java/io/netty/handler/codec/compression/BrotliEncoder.java.
Where is finish() defined?
finish() is defined in codec-compression/src/main/java/io/netty/handler/codec/compression/BrotliEncoder.java at line 258.
What does finish() call?
finish() calls 3 function(s): allocate, close, finish.
What calls finish()?
finish() is called by 2 function(s): close, finish.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free