|
OOP MimeParser Version 3.5 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.bentofw.mime.MimeParser
public final class MimeParser
This class parses the HTTP POST request with
multipart/form-data encoding.
This class is responsible for analyzing the
InputStream from the HTTP POST request.
All you need are:
| Method Summary | |
|---|---|
int |
getDefaultMaximumFileSize()
Returns the maximum file size which is specified in MimeParser.properties. |
java.lang.String |
getFileRoot()
Returns the root directory where the uploaded file will be saved. |
static MimeParser |
getInstance()
Reads the property file and returns the instance of this class. |
int |
getMaximumHeight()
Return the maximum height to be allowed. |
int |
getMaximumWidth()
Return the maximum width to be allowed. |
boolean |
isImageSizeChecked()
The true if the size of the image file (JPEG, GIF or PNG) will be checked. |
ParsedData |
parse(javax.servlet.http.HttpServletRequest req,
java.lang.String ch)
Deprecated. |
ParsedData |
parse(javax.servlet.http.HttpServletRequest req,
java.lang.String ch,
int max)
Deprecated. |
ParsedData |
parse(javax.servlet.http.HttpServletRequest req,
java.lang.String ch,
java.lang.String dir)
Deprecated. |
ParsedData |
parse(javax.servlet.http.HttpServletRequest req,
java.lang.String ch,
java.lang.String dir,
int max)
Deprecated. |
ParsedData |
parseAndSave(javax.servlet.http.HttpServletRequest req,
java.lang.String dir)
Parses the HTTP POST request with multipart/form-data and returns the result as ParsedData instance. |
ParsedData |
parseAndSave(javax.servlet.http.HttpServletRequest req,
java.lang.String dir,
int max)
Parses the HTTP POST request with multipart/form-data and returns the result as ParsedData instance. |
ParsedData |
parseAndSave(javax.servlet.http.HttpServletRequest req,
java.lang.String dir,
int max,
java.util.Set allow_mime)
Parses the HTTP POST request with multipart/form-data and returns the result as ParsedData instance. |
ParsedData |
parseAndSave(javax.servlet.http.HttpServletRequest req,
java.lang.String dir,
java.util.Set allow_mime)
Parses the HTTP POST request with multipart/form-data and returns the result as ParsedData instance. |
ParsedData |
parseAndSave(javax.servlet.http.HttpServletRequest req,
java.lang.String ch,
java.lang.String dir)
Parses the HTTP POST request with multipart/form-data and returns the result as ParsedData instance. |
ParsedData |
parseAndSave(javax.servlet.http.HttpServletRequest req,
java.lang.String ch,
java.lang.String dir,
int max)
Parses the HTTP POST request with multipart/form-data and returns the result as ParsedData instance. |
ParsedData |
parseAndSave(javax.servlet.http.HttpServletRequest req,
java.lang.String ch,
java.lang.String dir,
int max,
java.util.Set allow_mime)
Parses the HTTP POST request with multipart/form-data and returns the result as ParsedData instance. |
ParsedData |
parseAndSave(javax.servlet.http.HttpServletRequest req,
java.lang.String ch,
java.lang.String dir,
java.util.Set allow_mime)
Parses the HTTP POST request with multipart/form-data and returns the result as ParsedData instance. |
ParsedData |
parseOnly(javax.servlet.http.HttpServletRequest req)
Parses the HTTP POST request with multipart/form-data and returns the result as ParsedData instance. |
ParsedData |
parseOnly(javax.servlet.http.HttpServletRequest req,
int max)
Parses the HTTP POST request with multipart/form-data and returns the result as ParsedData instance. |
ParsedData |
parseOnly(javax.servlet.http.HttpServletRequest req,
int max,
java.util.Set allow_mime)
Parses the HTTP POST request with multipart/form-data and returns the result as ParsedData instance. |
ParsedData |
parseOnly(javax.servlet.http.HttpServletRequest req,
java.util.Set allow_mime)
Parses the HTTP POST request with multipart/form-data and returns the result as ParsedData instance. |
ParsedData |
parseOnly(javax.servlet.http.HttpServletRequest req,
java.lang.String ch)
Parses the HTTP POST request with multipart/form-data and returns the result as ParsedData instance. |
ParsedData |
parseOnly(javax.servlet.http.HttpServletRequest req,
java.lang.String ch,
int max)
Parses the HTTP POST request with multipart/form-data and returns the result as ParsedData instance. |
ParsedData |
parseOnly(javax.servlet.http.HttpServletRequest req,
java.lang.String ch,
int max,
java.util.Set allow_mime)
Parses the HTTP POST request with multipart/form-data and returns the result as ParsedData instance. |
ParsedData |
parseOnly(javax.servlet.http.HttpServletRequest req,
java.lang.String ch,
java.util.Set allow_mime)
Parses the HTTP POST request with multipart/form-data and returns the result as ParsedData instance. |
void |
setDebug(boolean db)
|
void |
setLogger(GenericLogger logger)
Set GenericLogger object to which the log messages will be written. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void setDebug(boolean db)
public static MimeParser getInstance()
throws SimpleException,
NestedException,
NoPropertyFileException
SimpleException
NestedException
NoPropertyFileExceptionpublic java.lang.String getFileRoot()
public int getDefaultMaximumFileSize()
public boolean isImageSizeChecked()
public int getMaximumWidth()
public int getMaximumHeight()
public ParsedData parseAndSave(javax.servlet.http.HttpServletRequest req,
java.lang.String ch,
java.lang.String dir,
int max)
throws SimpleException,
TooLargeFileException,
NestedException,
TooLargeBodyException
req - The HTTP requestch - The charset used to decode the text values
from TEXT INPUT and SELECTION.
For details about the charset, please read
another page.dir - The sub-directory beneath the root directory,
where the uploaded file will be saved.
For details about where to save the file, please read
another page.max - The maximum size (in bytes) of the uploaded file.
For details about the maximum size, please read
another page.
SimpleException
TooLargeFileException
NestedException
TooLargeBodyException
public ParsedData parse(javax.servlet.http.HttpServletRequest req,
java.lang.String ch,
java.lang.String dir,
int max)
throws java.io.IOException,
javax.mail.MessagingException,
javax.mail.internet.ParseException,
SimpleException,
TooLargeFileException,
java.util.MissingResourceException,
java.lang.ClassNotFoundException,
TooLargeBodyException
parseAndSave(HttpServletRequest,String,String,int)
parseAndSave(HttpServletRequest,String,String,int)
instead.
req - The HTTP requestch - The charset used to decode the text values
from TEXT INPUT and SELECTION.
For details about the charset, please read
another page.dir - The sub-directory beneath the root directory,
where the uploaded file will be saved.
For details about where to save the file, please read
another page.max - The maximum size (in bytes) of the uploaded file.
For details about the maximum size, please read
another page.
java.io.IOException
javax.mail.MessagingException
javax.mail.internet.ParseException
SimpleException
TooLargeFileException
java.util.MissingResourceException
java.lang.ClassNotFoundException
TooLargeBodyException
public ParsedData parseAndSave(javax.servlet.http.HttpServletRequest req,
java.lang.String ch,
java.lang.String dir)
throws SimpleException,
TooLargeFileException,
NestedException,
TooLargeBodyException
req - The HTTP requestch - The charset used to decode the text values
from TEXT INPUT and SELECTION.
For details about the charset, please read
another page.dir - The sub-directory beneath the root directory,
where the uploaded file will be saved.
For details about where to save the file, please read
another page.
SimpleException
TooLargeFileException
NestedException
TooLargeBodyException
public ParsedData parse(javax.servlet.http.HttpServletRequest req,
java.lang.String ch,
java.lang.String dir)
throws java.io.IOException,
javax.mail.MessagingException,
javax.mail.internet.ParseException,
SimpleException,
TooLargeFileException,
java.util.MissingResourceException,
java.lang.ClassNotFoundException,
TooLargeBodyException
parseAndSave(HttpServletRequest,String,String)
parseAndSave(HttpServletRequest,String,String)
instead.
req - The HTTP requestch - The charset used to decode the text values
from TEXT INPUT and SELECTION.
For details about the charset, please read
another page.dir - The sub-directory beneath the root directory,
where the uploaded file will be saved.
For details about where to save the file, please read
another page.
java.io.IOException
javax.mail.MessagingException
javax.mail.internet.ParseException
SimpleException
TooLargeFileException
java.util.MissingResourceException
java.lang.ClassNotFoundException
TooLargeBodyExceptionParsedData
public ParsedData parseAndSave(javax.servlet.http.HttpServletRequest req,
java.lang.String ch,
java.lang.String dir,
int max,
java.util.Set allow_mime)
throws SimpleException,
TooLargeFileException,
InvalidContentTypeException,
NestedException,
TooLargeBodyException,
LargeImageException
AcceptMime.
This class loads the list of the mime-types from the
property resource file and returns the java.util.Set
object.
As for the resource file, please read
another page.
LargeImageException.
req - The HTTP requestch - The charset used to decode the text values
from TEXT INPUT and SELECTION.
For details about the charset, please read
another page.dir - The sub-directory beneath the root directory,
where the uploaded file will be saved.
For details about where to save the file, please read
another page.max - The maximum size (in bytes) of the uploaded file.
For details about the maximum size, please read
another page.allow_mime - The instance of java.util.Set, which
contains the Strings for permitted mime-types.
SimpleException
TooLargeFileException
InvalidContentTypeException
NestedException
TooLargeBodyException
LargeImageException
public ParsedData parseAndSave(javax.servlet.http.HttpServletRequest req,
java.lang.String ch,
java.lang.String dir,
java.util.Set allow_mime)
throws SimpleException,
TooLargeFileException,
InvalidContentTypeException,
NestedException,
TooLargeBodyException,
LargeImageException
AcceptMime.
This class loads the list of the mime-types from the
property resource file and returns the java.util.Set
object.
As for the resource file, please read
another page.
LargeImageException.
req - The HTTP requestch - The charset used to decode the text values
from TEXT INPUT and SELECTION.
For details about the charset, please read
another page.dir - The sub-directory beneath the root directory,
where the uploaded file will be saved.
For details about where to save the file, please read
another page.allow_mime - The instance of java.util.Set, which
contains the Strings for permitted mime-types.
SimpleException
TooLargeFileException
InvalidContentTypeException
NestedException
TooLargeBodyException
LargeImageExceptionParsedData
public ParsedData parseOnly(javax.servlet.http.HttpServletRequest req,
java.lang.String ch,
int max)
throws SimpleException,
TooLargeFileException,
NestedException,
TooLargeBodyException
req - The HTTP requestch - The charset used to decode the text values
from TEXT INPUT and SELECTION.
For details about the charset, please read
another page.max - The maximum size (in bytes) of the uploaded file.
For details about the maximum size, please read
another page.
SimpleException
TooLargeFileException
NestedException
TooLargeBodyException
public ParsedData parse(javax.servlet.http.HttpServletRequest req,
java.lang.String ch,
int max)
throws java.io.IOException,
javax.mail.MessagingException,
javax.mail.internet.ParseException,
SimpleException,
TooLargeFileException,
java.util.MissingResourceException,
java.lang.ClassNotFoundException,
TooLargeBodyException
parseOnly(HttpServletRequest,String,int)
parseOnly(HttpServletRequest,String,int)
instead.
req - The HTTP requestch - The charset used to decode the text values
from TEXT INPUT and SELECTION.
For details about the charset, please read
another page.max - The maximum size (in bytes) of the uploaded file.
For details about the maximum size, please read
another page.
java.io.IOException
javax.mail.MessagingException
javax.mail.internet.ParseException
SimpleException
TooLargeFileException
java.util.MissingResourceException
java.lang.ClassNotFoundException
TooLargeBodyException
public ParsedData parseOnly(javax.servlet.http.HttpServletRequest req,
java.lang.String ch)
throws SimpleException,
TooLargeFileException,
NestedException,
TooLargeBodyException
req - The HTTP requestch - The charset used to decode the text values
from TEXT INPUT and SELECTION.
For details about the charset, please read
another page.
SimpleException
TooLargeFileException
NestedException
TooLargeBodyException
public ParsedData parse(javax.servlet.http.HttpServletRequest req,
java.lang.String ch)
throws java.io.IOException,
javax.mail.MessagingException,
javax.mail.internet.ParseException,
SimpleException,
TooLargeFileException,
java.util.MissingResourceException,
java.lang.ClassNotFoundException,
TooLargeBodyException
parseOnly(HttpServletRequest,String)
parseOnly(HttpServletRequest,String)
instead.
req - The HTTP requestch - The charset used to decode the text values
from TEXT INPUT and SELECTION.
For details about the charset, please read
another page.
java.io.IOException
javax.mail.MessagingException
javax.mail.internet.ParseException
SimpleException
TooLargeFileException
java.util.MissingResourceException
java.lang.ClassNotFoundException
TooLargeBodyException
public ParsedData parseOnly(javax.servlet.http.HttpServletRequest req,
java.lang.String ch,
int max,
java.util.Set allow_mime)
throws SimpleException,
TooLargeFileException,
InvalidContentTypeException,
NestedException,
TooLargeBodyException,
LargeImageException
AcceptMime.
This class loads the list of the mime-types from the
property resource file and returns the java.util.Set
object.
As for the resource file, please read
another page.
LargeImageException.
req - The HTTP requestch - The charset used to decode the text values
from TEXT INPUT and SELECTION.
For details about the charset, please read
another page.max - The maximum size (in bytes) of the uploaded file.
For details about the maximum size, please read
another page.allow_mime - The instance of java.util.Set, which
contains the Strings for permitted mime-types.
SimpleException
TooLargeFileException
InvalidContentTypeException
NestedException
TooLargeBodyException
LargeImageException
public ParsedData parseOnly(javax.servlet.http.HttpServletRequest req,
java.lang.String ch,
java.util.Set allow_mime)
throws SimpleException,
TooLargeFileException,
InvalidContentTypeException,
NestedException,
TooLargeBodyException,
LargeImageException
AcceptMime.
This class loads the list of the mime-types from the
property resource file and returns the java.util.Set
object.
As for the resource file, please read
another page.
LargeImageException.
req - The HTTP requestch - The charset used to decode the text values
from TEXT INPUT and SELECTION.
For details about the charset, please read
another page.allow_mime - The instance of java.util.Set, which
contains the Strings for permitted mime-types.
SimpleException
TooLargeFileException
InvalidContentTypeException
NestedException
TooLargeBodyException
LargeImageException
public ParsedData parseAndSave(javax.servlet.http.HttpServletRequest req,
java.lang.String dir,
int max)
throws SimpleException,
TooLargeFileException,
NestedException,
TooLargeBodyException
req - The HTTP requestdir - The sub-directory beneath the root directory,
where the uploaded file will be saved.
For details about where to save the file, please read
another page.max - The maximum size (in bytes) of the uploaded file.
For details about the maximum size, please read
another page.
SimpleException
TooLargeFileException
NestedException
TooLargeBodyException
public ParsedData parseAndSave(javax.servlet.http.HttpServletRequest req,
java.lang.String dir)
throws SimpleException,
TooLargeFileException,
NestedException,
TooLargeBodyException
req - The HTTP requestdir - The sub-directory beneath the root directory,
where the uploaded file will be saved.
For details about where to save the file, please read
another page.
SimpleException
TooLargeFileException
NestedException
TooLargeBodyException
public ParsedData parseAndSave(javax.servlet.http.HttpServletRequest req,
java.lang.String dir,
int max,
java.util.Set allow_mime)
throws SimpleException,
TooLargeFileException,
InvalidContentTypeException,
NestedException,
TooLargeBodyException,
LargeImageException
AcceptMime.
This class loads the list of the mime-types from the
property resource file and returns the java.util.Set
object.
As for the resource file, please read
another page.
LargeImageException.
req - The HTTP requestdir - The sub-directory beneath the root directory,
where the uploaded file will be saved.
For details about where to save the file, please read
another page.max - The maximum size (in bytes) of the uploaded file.
For details about the maximum size, please read
another page.allow_mime - The instance of java.util.Set, which
contains the Strings for permitted mime-types.
SimpleException
TooLargeFileException
InvalidContentTypeException
NestedException
TooLargeBodyException
LargeImageException
public ParsedData parseAndSave(javax.servlet.http.HttpServletRequest req,
java.lang.String dir,
java.util.Set allow_mime)
throws SimpleException,
TooLargeFileException,
InvalidContentTypeException,
NestedException,
TooLargeBodyException,
LargeImageException
AcceptMime.
This class loads the list of the mime-types from the
property resource file and returns the java.util.Set
object.
As for the resource file, please read
another page.
LargeImageException.
req - The HTTP requestdir - The sub-directory beneath the root directory,
where the uploaded file will be saved.
For details about where to save the file, please read
another page.allow_mime - The instance of java.util.Set, which
contains the Strings for permitted mime-types.
SimpleException
TooLargeFileException
InvalidContentTypeException
NestedException
TooLargeBodyException
LargeImageExceptionParsedData
public ParsedData parseOnly(javax.servlet.http.HttpServletRequest req,
int max)
throws SimpleException,
TooLargeFileException,
NestedException,
TooLargeBodyException
req - The HTTP requestmax - The maximum size (in bytes) of the uploaded file.
For details about the maximum size, please read
another page.
SimpleException
TooLargeFileException
NestedException
TooLargeBodyException
public ParsedData parseOnly(javax.servlet.http.HttpServletRequest req)
throws SimpleException,
TooLargeFileException,
NestedException,
TooLargeBodyException
req - The HTTP request
SimpleException
TooLargeFileException
NestedException
TooLargeBodyException
public ParsedData parseOnly(javax.servlet.http.HttpServletRequest req,
int max,
java.util.Set allow_mime)
throws SimpleException,
TooLargeFileException,
InvalidContentTypeException,
NestedException,
TooLargeBodyException,
LargeImageException
AcceptMime.
This class loads the list of the mime-types from the
property resource file and returns the java.util.Set
object.
As for the resource file, please read
another page.
LargeImageException.
req - The HTTP requestmax - The maximum size (in bytes) of the uploaded file.
For details about the maximum size, please read
another page.allow_mime - The instance of java.util.Set, which
contains the Strings for permitted mime-types.
SimpleException
TooLargeFileException
InvalidContentTypeException
NestedException
TooLargeBodyException
LargeImageException
public ParsedData parseOnly(javax.servlet.http.HttpServletRequest req,
java.util.Set allow_mime)
throws SimpleException,
TooLargeFileException,
InvalidContentTypeException,
NestedException,
TooLargeBodyException,
LargeImageException
AcceptMime.
This class loads the list of the mime-types from the
property resource file and returns the java.util.Set
object.
As for the resource file, please read
another page.
LargeImageException.
req - The HTTP requestallow_mime - The instance of java.util.Set, which
contains the Strings for permitted mime-types.
SimpleException
TooLargeFileException
InvalidContentTypeException
NestedException
TooLargeBodyException
LargeImageException
public void setLogger(GenericLogger logger)
GenericLogger object to which the log messages will be written.
logger - GenericLogger object to which the log messages will be
written.
|
OOP MimeParser Version 3.5 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ALL CONTENTS COPYRIGHT 2005, OOP-Research Corporation. All rights reserved.
Any questions and comments are welcome to OOP-Research Corporation.