Interface FileItem
- All Known Implementing Classes:
FormData.FileItemImpl
public interface FileItem
Represents an item of a multipart message for which the
filename
attribute has been specified-
Method Summary
Modifier and TypeMethodDescriptionvoid
delete()
If the part represents a file on the file system, delete it, otherwise do nothinggetFile()
Gives access to the file stored on the file system.long
The size of the body - works regardless of the result ofisInMemory
The body represented as anInputStream
- works regardless of the result ofisInMemory
boolean
Determines whether the body is held in memoryvoid
Copy the body to the specifiedPath
- works regardless of the result ofisInMemory
-
Method Details
-
isInMemory
boolean isInMemory()Determines whether the body is held in memory -
getFile
Path getFile()Gives access to the file stored on the file system. This should only be used whenisInMemory
isfalse
-
getFileSize
The size of the body - works regardless of the result ofisInMemory
- Throws:
IOException
-
getInputStream
The body represented as anInputStream
- works regardless of the result ofisInMemory
- Throws:
IOException
-
delete
If the part represents a file on the file system, delete it, otherwise do nothing- Throws:
IOException
-
write
Copy the body to the specifiedPath
- works regardless of the result ofisInMemory
- Throws:
IOException
-