HttpPostBodyUtil Class — netty Architecture
Architecture documentation for the HttpPostBodyUtil class in HttpPostBodyUtil.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD d8fd760f_9426_5ef6_86a5_3c8c134ada4d["HttpPostBodyUtil"] f38a6669_d982_74d4_e24c_5fdbabffde3f["HttpPostBodyUtil.java"] d8fd760f_9426_5ef6_86a5_3c8c134ada4d -->|defined in| f38a6669_d982_74d4_e24c_5fdbabffde3f 9d71f019_7f08_8eb1_fbba_f542c586d074["HttpPostBodyUtil()"] d8fd760f_9426_5ef6_86a5_3c8c134ada4d -->|method| 9d71f019_7f08_8eb1_fbba_f542c586d074 d3e8e0a5_d61d_ce5b_bbb1_1cc86688aa04["findNonWhitespace()"] d8fd760f_9426_5ef6_86a5_3c8c134ada4d -->|method| d3e8e0a5_d61d_ce5b_bbb1_1cc86688aa04 c85ee811_1367_9537_62f3_3376b1852438["findEndOfString()"] d8fd760f_9426_5ef6_86a5_3c8c134ada4d -->|method| c85ee811_1367_9537_62f3_3376b1852438 85f6b0ab_c9f1_6114_61fc_2bd23b446493["findLineBreak()"] d8fd760f_9426_5ef6_86a5_3c8c134ada4d -->|method| 85f6b0ab_c9f1_6114_61fc_2bd23b446493 8c603946_ffae_b014_4d41_13d47a4fab99["findLastLineBreak()"] d8fd760f_9426_5ef6_86a5_3c8c134ada4d -->|method| 8c603946_ffae_b014_4d41_13d47a4fab99 cf225f0b_71a3_1bbc_7543_bb72e51e03b8["findDelimiter()"] d8fd760f_9426_5ef6_86a5_3c8c134ada4d -->|method| cf225f0b_71a3_1bbc_7543_bb72e51e03b8
Relationship Graph
Source Code
codec-http/src/main/java/io/netty/handler/codec/http/multipart/HttpPostBodyUtil.java lines 24–269
final class HttpPostBodyUtil {
public static final int chunkSize = 8096;
/**
* Default Content-Type in binary form
*/
public static final String DEFAULT_BINARY_CONTENT_TYPE = "application/octet-stream";
/**
* Default Content-Type in Text form
*/
public static final String DEFAULT_TEXT_CONTENT_TYPE = "text/plain";
/**
* Allowed mechanism for multipart
* mechanism := "7bit"
/ "8bit"
/ "binary"
Not allowed: "quoted-printable"
/ "base64"
*/
public enum TransferEncodingMechanism {
/**
* Default encoding
*/
BIT7("7bit"),
/**
* Short lines but not in ASCII - no encoding
*/
BIT8("8bit"),
/**
* Could be long text not in ASCII - no encoding
*/
BINARY("binary");
private final String value;
TransferEncodingMechanism(String value) {
this.value = value;
}
public String value() {
return value;
}
@Override
public String toString() {
return value;
}
}
private HttpPostBodyUtil() {
}
/**
* This class intends to decrease the CPU in seeking ahead some bytes in
* HttpPostRequestDecoder
*/
static class SeekAheadOptimize {
byte[] bytes;
int readerIndex;
int pos;
int origPos;
int limit;
ByteBuf buffer;
/**
* @param buffer buffer with a backing byte array
*/
SeekAheadOptimize(ByteBuf buffer) {
if (!buffer.hasArray()) {
throw new IllegalArgumentException("buffer hasn't backing byte array");
}
this.buffer = buffer;
bytes = buffer.array();
readerIndex = buffer.readerIndex();
origPos = pos = buffer.arrayOffset() + readerIndex;
limit = buffer.arrayOffset() + buffer.writerIndex();
}
Source
Frequently Asked Questions
What is the HttpPostBodyUtil class?
HttpPostBodyUtil is a class in the netty codebase, defined in codec-http/src/main/java/io/netty/handler/codec/http/multipart/HttpPostBodyUtil.java.
Where is HttpPostBodyUtil defined?
HttpPostBodyUtil is defined in codec-http/src/main/java/io/netty/handler/codec/http/multipart/HttpPostBodyUtil.java at line 24.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free