String() — netty Function Reference
Architecture documentation for the String() function in HttpPostMultipartRequestDecoder.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD d8be390a_c91f_0e33_8721_e16b03e63b4d["String()"] d07408ef_0ab6_54bb_c64e_0b5b9a0aac25["HttpPostMultipartRequestDecoder"] d8be390a_c91f_0e33_8721_e16b03e63b4d -->|defined in| d07408ef_0ab6_54bb_c64e_0b5b9a0aac25 style d8be390a_c91f_0e33_8721_e16b03e63b4d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http/src/main/java/io/netty/handler/codec/http/multipart/HttpPostMultipartRequestDecoder.java lines 1042–1071
private static String readLineOptimized(ByteBuf undecodedChunk, Charset charset) {
int readerIndex = undecodedChunk.readerIndex();
ByteBuf line = null;
try {
if (undecodedChunk.isReadable()) {
int posLfOrCrLf = HttpPostBodyUtil.findLineBreak(undecodedChunk, undecodedChunk.readerIndex());
if (posLfOrCrLf <= 0) {
throw new NotEnoughDataDecoderException();
}
try {
line = undecodedChunk.alloc().heapBuffer(posLfOrCrLf);
line.writeBytes(undecodedChunk, posLfOrCrLf);
byte nextByte = undecodedChunk.readByte();
if (nextByte == HttpConstants.CR) {
// force read next byte since LF is the following one
undecodedChunk.readByte();
}
return line.toString(charset);
} finally {
line.release();
}
}
} catch (IndexOutOfBoundsException e) {
undecodedChunk.readerIndex(readerIndex);
throw new NotEnoughDataDecoderException(e);
}
undecodedChunk.readerIndex(readerIndex);
throw new NotEnoughDataDecoderException();
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does String() do?
String() is a function in the netty codebase, defined in codec-http/src/main/java/io/netty/handler/codec/http/multipart/HttpPostMultipartRequestDecoder.java.
Where is String() defined?
String() is defined in codec-http/src/main/java/io/netty/handler/codec/http/multipart/HttpPostMultipartRequestDecoder.java at line 1042.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free