|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.fileupload.FileUploadBase.FileItemIteratorImpl.FileItemStreamImpl
private class FileUploadBase.FileItemIteratorImpl.FileItemStreamImpl
Default implementation of FileItemStream
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.commons.fileupload.FileItemStream |
---|
FileItemStream.ItemSkippedException |
Field Summary | |
---|---|
private java.lang.String |
contentType
The file items content type. |
private java.lang.String |
fieldName
The file items field name. |
private boolean |
formField
Whether the file item is a form field. |
private FileItemHeaders |
headers
The headers, if any. |
private java.lang.String |
name
The file items file name. |
private boolean |
opened
Whether the file item was already opened. |
private java.io.InputStream |
stream
The file items input stream. |
Constructor Summary | |
---|---|
FileUploadBase.FileItemIteratorImpl.FileItemStreamImpl(java.lang.String pName,
java.lang.String pFieldName,
java.lang.String pContentType,
boolean pFormField,
long pContentLength)
Creates a new instance. |
Method Summary | |
---|---|
(package private) void |
close()
Closes the file item. |
java.lang.String |
getContentType()
Returns the items content type, or null. |
java.lang.String |
getFieldName()
Returns the items field name. |
FileItemHeaders |
getHeaders()
Returns the file item headers. |
java.lang.String |
getName()
Returns the items file name. |
boolean |
isFormField()
Returns, whether this is a form field. |
java.io.InputStream |
openStream()
Returns an input stream, which may be used to read the items contents. |
void |
setHeaders(FileItemHeaders pHeaders)
Sets the file item headers. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final java.lang.String contentType
private final java.lang.String fieldName
private final java.lang.String name
private final boolean formField
private final java.io.InputStream stream
private boolean opened
private FileItemHeaders headers
Constructor Detail |
---|
FileUploadBase.FileItemIteratorImpl.FileItemStreamImpl(java.lang.String pName, java.lang.String pFieldName, java.lang.String pContentType, boolean pFormField, long pContentLength) throws java.io.IOException
pName
- The items file name, or null.pFieldName
- The items field name.pContentType
- The items content type, or null.pFormField
- Whether the item is a form field.pContentLength
- The items content length, if known, or -1
java.io.IOException
- Creating the file item failed.Method Detail |
---|
public java.lang.String getContentType()
getContentType
in interface FileItemStream
public java.lang.String getFieldName()
getFieldName
in interface FileItemStream
public java.lang.String getName()
getName
in interface FileItemStream
public boolean isFormField()
isFormField
in interface FileItemStream
public java.io.InputStream openStream() throws java.io.IOException
openStream
in interface FileItemStream
java.io.IOException
- An I/O error occurred.FileItemStream.ItemSkippedException
void close() throws java.io.IOException
java.io.IOException
- An I/O error occurred.public FileItemHeaders getHeaders()
getHeaders
in interface FileItemHeadersSupport
public void setHeaders(FileItemHeaders pHeaders)
setHeaders
in interface FileItemHeadersSupport
pHeaders
- The items header object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |