public class ContentDispositionParser extends Parser implements ContentDisposition
ContentDispositionParser
object is used to represent
a parser used to parse the Content-Disposition header. Its used when
there is a multipart form upload to the server and allows the
server to determine the individual part types.Constructor and Description |
---|
ContentDispositionParser()
Constructor for the
ContentDispositionParser object. |
ContentDispositionParser(String text)
Constructor for the
ContentDispositionParser object. |
Modifier and Type | Method and Description |
---|---|
protected void |
clear()
This is used to clear all previously collected tokens.
|
String |
getFileName()
This method is used to acquire the file name of the part.
|
String |
getName()
This method is used to acquire the name of the part.
|
protected void |
init()
This will initialize the
Parser when it is ready
to parse a new String . |
boolean |
isFile()
This method is used to determine the type of a part.
|
protected void |
parse()
This is the method that should be implemented to read the
buffer.
|
public ContentDispositionParser()
ContentDispositionParser
object.
This is used to create a parser that can parse a disposition
header which is typically sent as part of a multipart upload. It
can be used to determine the type of the upload.public ContentDispositionParser(String text)
ContentDispositionParser
object.
This is used to create a parser that can parse a disposition header
which is typically sent as part of a multipart upload. It can
be used to determine the type of the upload.text
- this is the header value that is to be parsedpublic String getFileName()
getFileName
in interface ContentDisposition
public String getName()
getName
in interface ContentDisposition
public boolean isFile()
isFile
in interface ContentDisposition
protected void init()
Parser
when it is ready
to parse a new String
. This will reset the
parser to a ready state. This method is invoked by the parser
before the parse method is invoked, it is used to pack the
contents of the header and clear any previous tokens used.protected void clear()
protected void parse()
Copyright © 2018. All rights reserved.