HttpData Type — netty Architecture
Architecture documentation for the HttpData type/interface in HttpData.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD a371ec22_f840_de2b_c6c5_b35a5bfd0cd0["HttpData"] 19f2ef40_1057_f4d2_3cd1_3e39c4f9acfe["HttpData.java"] a371ec22_f840_de2b_c6c5_b35a5bfd0cd0 -->|defined in| 19f2ef40_1057_f4d2_3cd1_3e39c4f9acfe style a371ec22_f840_de2b_c6c5_b35a5bfd0cd0 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http/src/main/java/io/netty/handler/codec/http/multipart/HttpData.java lines 29–243
public interface HttpData extends InterfaceHttpData, ByteBufHolder {
/**
* Returns the maxSize for this HttpData.
*/
long getMaxSize();
/**
* Set the maxSize for this HttpData. When limit will be reached, an exception will be raised.
* Setting it to (-1) means no limitation.
*
* By default, to be set from the HttpDataFactory.
*/
void setMaxSize(long maxSize);
/**
* Check if the new size is not reaching the max limit allowed.
* The limit is always computed in terms of bytes.
*/
void checkSize(long newSize) throws IOException;
/**
* Set the content from the ChannelBuffer (erase any previous data)
* <p>{@link ByteBuf#release()} ownership of {@code buffer} is transferred to this {@link HttpData}.
*
* @param buffer
* must be not null
* @throws IOException
*/
void setContent(ByteBuf buffer) throws IOException;
/**
* Add the content from the ChannelBuffer
* <p>{@link ByteBuf#release()} ownership of {@code buffer} is transferred to this {@link HttpData}.
*
* @param buffer
* must be not null except if last is set to False
* @param last
* True of the buffer is the last one
* @throws IOException
*/
void addContent(ByteBuf buffer, boolean last) throws IOException;
/**
* Set the content from the file (erase any previous data)
*
* @param file
* must be not null
* @throws IOException
*/
void setContent(File file) throws IOException;
/**
* Set the content from the inputStream (erase any previous data)
*
* @param inputStream
* must be not null
* @throws IOException
*/
void setContent(InputStream inputStream) throws IOException;
/**
*
* @return True if the InterfaceHttpData is completed (all data are stored)
*/
boolean isCompleted();
/**
* Returns the size in byte of the InterfaceHttpData
*
* @return the size of the InterfaceHttpData
*/
long length();
/**
* Returns the defined length of the HttpData.
*
* If no Content-Length is provided in the request, the defined length is
* always 0 (whatever during decoding or in final state).
*
* If Content-Length is provided in the request, this is this given defined length.
Source
Frequently Asked Questions
What is the HttpData type?
HttpData is a type/interface in the netty codebase, defined in codec-http/src/main/java/io/netty/handler/codec/http/multipart/HttpData.java.
Where is HttpData defined?
HttpData is defined in codec-http/src/main/java/io/netty/handler/codec/http/multipart/HttpData.java at line 29.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free