Class FormData.FileItemImpl
- java.lang.Object
-
- org.jboss.resteasy.reactive.server.core.multipart.FormData.FileItemImpl
-
-
Constructor Summary
Constructors Constructor Description FileItemImpl(byte[] content)
FileItemImpl(Path file)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete()
If the part represents a file on the file system, delete it, otherwise do nothingPath
getFile()
Gives access to the file stored on the file system.long
getFileSize()
The size of the body - works regardless of the result ofisInMemory
InputStream
getInputStream()
The body represented as anInputStream
- works regardless of the result ofisInMemory
boolean
isInMemory()
Determines whether the body is held in memoryvoid
write(Path target)
Copy the body to the specifiedPath
- works regardless of the result ofisInMemory
-
-
-
Constructor Detail
-
FileItemImpl
public FileItemImpl(Path file)
-
FileItemImpl
public FileItemImpl(byte[] content)
-
-
Method Detail
-
isInMemory
public boolean isInMemory()
Description copied from interface:FileItem
Determines whether the body is held in memory- Specified by:
isInMemory
in interfaceFileItem
-
getFile
public Path getFile()
Description copied from interface:FileItem
Gives access to the file stored on the file system. This should only be used whenisInMemory
isfalse
-
getFileSize
public long getFileSize() throws IOException
Description copied from interface:FileItem
The size of the body - works regardless of the result ofisInMemory
- Specified by:
getFileSize
in interfaceFileItem
- Throws:
IOException
-
getInputStream
public InputStream getInputStream() throws IOException
Description copied from interface:FileItem
The body represented as anInputStream
- works regardless of the result ofisInMemory
- Specified by:
getInputStream
in interfaceFileItem
- Throws:
IOException
-
delete
public void delete() throws IOException
Description copied from interface:FileItem
If the part represents a file on the file system, delete it, otherwise do nothing- Specified by:
delete
in interfaceFileItem
- Throws:
IOException
-
write
public void write(Path target) throws IOException
Description copied from interface:FileItem
Copy the body to the specifiedPath
- works regardless of the result ofisInMemory
- Specified by:
write
in interfaceFileItem
- Throws:
IOException
-
-