org.apache.tomcat.util.http.fileupload.FileUploadBase Java Examples
The following examples show how to use
org.apache.tomcat.util.http.fileupload.FileUploadBase.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ServletRequestContext.java From Tomcat8-Source-Read with MIT License | 5 votes |
/** * Retrieve the content length of the request. * * @return The content length of the request. * @since 1.3 */ @Override public long contentLength() { long size; try { size = Long.parseLong(request.getHeader(FileUploadBase.CONTENT_LENGTH)); } catch (NumberFormatException e) { size = request.getContentLength(); } return size; }
Example #2
Source File: ServletRequestContext.java From Tomcat7.0.67 with Apache License 2.0 | 5 votes |
/** * Retrieve the content length of the request. * * @return The content length of the request. * @since 1.3 */ @Override public long contentLength() { long size; try { size = Long.parseLong(request.getHeader(FileUploadBase.CONTENT_LENGTH)); } catch (NumberFormatException e) { size = request.getContentLength(); } return size; }
Example #3
Source File: ServletRequestContext.java From tomcatsrc with Apache License 2.0 | 5 votes |
/** * Retrieve the content length of the request. * * @return The content length of the request. * @since 1.3 */ @Override public long contentLength() { long size; try { size = Long.parseLong(request.getHeader(FileUploadBase.CONTENT_LENGTH)); } catch (NumberFormatException e) { size = request.getContentLength(); } return size; }
Example #4
Source File: ServletFileUpload.java From Tomcat8-Source-Read with MIT License | 3 votes |
/** * Utility method that determines whether the request contains multipart * content. * * @param request The servlet request to be evaluated. Must be non-null. * * @return <code>true</code> if the request is multipart; * <code>false</code> otherwise. */ public static final boolean isMultipartContent( HttpServletRequest request) { if (!POST_METHOD.equalsIgnoreCase(request.getMethod())) { return false; } return FileUploadBase.isMultipartContent(new ServletRequestContext(request)); }
Example #5
Source File: ServletFileUpload.java From Tomcat7.0.67 with Apache License 2.0 | 3 votes |
/** * Utility method that determines whether the request contains multipart * content. * * @param request The servlet request to be evaluated. Must be non-null. * * @return <code>true</code> if the request is multipart; * <code>false</code> otherwise. */ public static final boolean isMultipartContent( HttpServletRequest request) { if (!POST_METHOD.equalsIgnoreCase(request.getMethod())) { return false; } return FileUploadBase.isMultipartContent(new ServletRequestContext(request)); }
Example #6
Source File: ServletFileUpload.java From tomcatsrc with Apache License 2.0 | 3 votes |
/** * Utility method that determines whether the request contains multipart * content. * * @param request The servlet request to be evaluated. Must be non-null. * * @return <code>true</code> if the request is multipart; * <code>false</code> otherwise. */ public static final boolean isMultipartContent( HttpServletRequest request) { if (!POST_METHOD.equalsIgnoreCase(request.getMethod())) { return false; } return FileUploadBase.isMultipartContent(new ServletRequestContext(request)); }