728x90
https://docs.oracle.com/javaee/7/api/javax/servlet/annotation/MultipartConfig.html
MultipartConfig (Java(TM) EE 7 Specification APIs)
The maximum size allowed for uploaded files. The default is -1L, which means unlimited.
docs.oracle.com
Annotation that may be specified on a Servlet class, indicating that instances of the Servlet expect requests that conform to the multipart/form-data MIME type.
Servlets annotated with MultipartConfig may retrieve the Part components of a given multipart/form-data request by calling getPart or getParts.
Optional Element Summary
Optional ElementsModifier and TypeOptional Element and Description
int | fileSizeThresholdThe size threshold after which the file will be written to disk |
String | locationThe directory location where files will be stored |
long | maxFileSizeThe maximum size allowed for uploaded files. |
long | maxRequestSizeThe maximum size allowed for multipart/form-data requests |
https://docs.oracle.com/javaee/6/api/index.html
Java EE 6
docs.oracle.com
Method Summary
void | addHeader(java.lang.String header_name, java.lang.String header_value) Add this value to the existing values for this header_name. |
java.util.Enumeration | getAllHeaders() Return all the headers from this part as an Enumeration of Header objects. |
java.lang.Object | getContent() Return the content as a Java object. |
java.lang.String | getContentType() Returns the Content-Type of the content of this part. |
javax.activation.DataHandler | getDataHandler() Return a DataHandler for the content within this part. |
java.lang.String | getDescription() Return a description String for this part. |
java.lang.String | getDisposition() Return the disposition of this part. |
java.lang.String | getFileName() Get the filename associated with this part, if possible. |
java.lang.String[] | getHeader(java.lang.String header_name) Get all the headers for this header name. |
java.io.InputStream | getInputStream() Return an input stream for this part's "content". |
int | getLineCount() Return the number of lines in the content of this part. |
java.util.Enumeration | getMatchingHeaders(java.lang.String[] header_names) Return matching headers from this part as an Enumeration of Header objects. |
java.util.Enumeration | getNonMatchingHeaders(java.lang.String[] header_names) Return non-matching headers from this envelope as an Enumeration of Header objects. |
int | getSize() Return the size of the content of this part in bytes. |
boolean | isMimeType(java.lang.String mimeType) Is this Part of the specified MIME type? This method compares only the primaryType and subType. |
void | removeHeader(java.lang.String header_name) Remove all headers with this name. |
void | setContent(Multipart mp) This method sets the given Multipart object as this message's content. |
void | setContent(java.lang.Object obj, java.lang.String type) A convenience method for setting this part's content. |
void | setDataHandler(javax.activation.DataHandler dh) This method provides the mechanism to set this part's content. |
void | setDescription(java.lang.String description) Set a description String for this part. |
void | setDisposition(java.lang.String disposition) Set the disposition of this part. |
void | setFileName(java.lang.String filename) Set the filename associated with this part, if possible. |
void | setHeader(java.lang.String header_name, java.lang.String header_value) Set the value for this header_name. |
void | setText(java.lang.String text) A convenience method that sets the given String as this part's content with a MIME type of "text/plain". |
void | writeTo(java.io.OutputStream os) Output a bytestream for this Part. |
728x90
'코딩 > JAVA' 카테고리의 다른 글
메서드_return, 반복문_break, continue 차이 및 특징_타 블로그 (0) | 2021.08.16 |
---|---|
File 클래스_자바의정석 (0) | 2021.08.03 |
변수의 초기화_자바의정석 (0) | 2021.08.02 |
생성자를 이용한 인스턴스의 복사_자바의정석 (0) | 2021.08.02 |
Eclipse (설정 가져오기/내보내기)Preferences Export/Import (0) | 2021.07.30 |