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 voiddelete()If the part represents a file on the file system, delete it, otherwise do nothingPathgetFile()Gives access to the file stored on the file system.longgetFileSize()The size of the body - works regardless of the result ofisInMemoryInputStreamgetInputStream()The body represented as anInputStream- works regardless of the result ofisInMemorybooleanisInMemory()Determines whether the body is held in memoryvoidwrite(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:FileItemDetermines whether the body is held in memory- Specified by:
isInMemoryin interfaceFileItem
-
getFile
public Path getFile()
Description copied from interface:FileItemGives access to the file stored on the file system. This should only be used whenisInMemoryisfalse
-
getFileSize
public long getFileSize() throws IOExceptionDescription copied from interface:FileItemThe size of the body - works regardless of the result ofisInMemory- Specified by:
getFileSizein interfaceFileItem- Throws:
IOException
-
getInputStream
public InputStream getInputStream() throws IOException
Description copied from interface:FileItemThe body represented as anInputStream- works regardless of the result ofisInMemory- Specified by:
getInputStreamin interfaceFileItem- Throws:
IOException
-
delete
public void delete() throws IOExceptionDescription copied from interface:FileItemIf the part represents a file on the file system, delete it, otherwise do nothing- Specified by:
deletein interfaceFileItem- Throws:
IOException
-
write
public void write(Path target) throws IOException
Description copied from interface:FileItemCopy the body to the specifiedPath- works regardless of the result ofisInMemory- Specified by:
writein interfaceFileItem- Throws:
IOException
-
-