Class FormData.FileItemImpl

java.lang.Object
org.jboss.resteasy.reactive.server.core.multipart.FormData.FileItemImpl
All Implemented Interfaces:
FileItem
Enclosing class:
FormData

public static class FormData.FileItemImpl extends Object implements FileItem
  • Constructor Details

    • FileItemImpl

      public FileItemImpl(Path file)
    • FileItemImpl

      public FileItemImpl(byte[] content)
  • Method Details

    • isInMemory

      public boolean isInMemory()
      Description copied from interface: FileItem
      Determines whether the body is held in memory
      Specified by:
      isInMemory in interface FileItem
    • getFile

      public Path getFile()
      Description copied from interface: FileItem
      Gives access to the file stored on the file system. This should only be used when isInMemory is false
      Specified by:
      getFile in interface FileItem
    • getFileSize

      public long getFileSize() throws IOException
      Description copied from interface: FileItem
      The size of the body - works regardless of the result of isInMemory
      Specified by:
      getFileSize in interface FileItem
      Throws:
      IOException
    • getInputStream

      public InputStream getInputStream() throws IOException
      Description copied from interface: FileItem
      The body represented as an InputStream - works regardless of the result of isInMemory
      Specified by:
      getInputStream in interface FileItem
      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 interface FileItem
      Throws:
      IOException
    • write

      public void write(Path target) throws IOException
      Description copied from interface: FileItem
      Copy the body to the specified Path - works regardless of the result of isInMemory
      Specified by:
      write in interface FileItem
      Throws:
      IOException