Class TiangongPart

java.lang.Object
tech.riemann.nif.support.tiangong.servlet.multipart.TiangongPart
All Implemented Interfaces:
jakarta.servlet.http.Part

public class TiangongPart extends Object implements jakarta.servlet.http.Part
  • Method Details

    • inMemory

      public static TiangongPart inMemory(String name, String filename, String contentType, Map<String,String> headers, byte[] body)
    • onDisk

      public static TiangongPart onDisk(String name, String filename, String contentType, Map<String,String> headers, Path tempFile, long size)
    • isInMemory

      public boolean isInMemory()
    • getTempFile

      public Path getTempFile()
    • getInputStream

      public InputStream getInputStream() throws IOException
      Specified by:
      getInputStream in interface jakarta.servlet.http.Part
      Throws:
      IOException
    • getContentType

      public String getContentType()
      Specified by:
      getContentType in interface jakarta.servlet.http.Part
    • getName

      public String getName()
      Specified by:
      getName in interface jakarta.servlet.http.Part
    • getSubmittedFileName

      public String getSubmittedFileName()
      Specified by:
      getSubmittedFileName in interface jakarta.servlet.http.Part
    • getSize

      public long getSize()
      Specified by:
      getSize in interface jakarta.servlet.http.Part
    • write

      public void write(String fileName) throws IOException
      Specified by:
      write in interface jakarta.servlet.http.Part
      Throws:
      IOException
    • delete

      public void delete() throws IOException
      Specified by:
      delete in interface jakarta.servlet.http.Part
      Throws:
      IOException
    • getHeader

      public String getHeader(String name)
      Specified by:
      getHeader in interface jakarta.servlet.http.Part
    • getHeaders

      public Collection<String> getHeaders(String name)
      Specified by:
      getHeaders in interface jakarta.servlet.http.Part
    • getHeaderNames

      public Collection<String> getHeaderNames()
      Specified by:
      getHeaderNames in interface jakarta.servlet.http.Part