public class DiskFileItem extends FileItemBase
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
DEFAULT_SIZE_THRESHOLD |
| 构造器和说明 |
|---|
DiskFileItem(FileItemStream stream,
File cacheFile) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
deleteOrSkip()
Deletes the underlying storage for a file item, including deleting any
associated temporary disk file.
|
protected void |
finalize() |
long |
getSize()
Returns the size of the file item.
|
protected void |
init(FileItemStream stream,
File cacheFile) |
InputStream |
openStream()
Creates an
InputStream, which allows to read the items contents. |
get, getContentType, getFieldName, getHeaders, getName, getString, getString, isFormField, writeTo, writeTopublic static final int DEFAULT_SIZE_THRESHOLD
public DiskFileItem(FileItemStream stream, File cacheFile) throws IOException
IOExceptionprotected void init(FileItemStream stream, File cacheFile) throws IOException
IOExceptionpublic long getSize()
FileItempublic void deleteOrSkip()
FileItemFileItem instance is garbage
collected, this method can be used to ensure that this is done at an
earlier time, thus preserving system resources.public InputStream openStream() throws IOException
FileItemStreamInputStream, which allows to read the items contents.IOException - An I/O error occurred.