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 TypeMethodDescriptionvoiddelete()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.longThe size of the body - works regardless of the result ofisInMemoryThe body represented as anInputStream- works regardless of the result ofisInMemorybooleanDetermines whether the body is held in memoryvoidCopy 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 whenisInMemoryisfalse -
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
-