Class JakartaUploadPart

java.lang.Object
com.oorian.jakarta.JakartaUploadPart
All Implemented Interfaces:
OorianUploadPart

public class JakartaUploadPart extends Object implements OorianUploadPart
Adapter that wraps a Part to implement the framework-agnostic OorianUploadPart interface.

This class is used by the thin Jakarta library to bridge between the servlet container and the Oorian common library.

Since:
2.1
Version:
1.0
Author:
Oorian Framework
See Also:
  • Constructor Details

    • JakartaUploadPart

      public JakartaUploadPart(jakarta.servlet.http.Part part)
      Creates a new adapter wrapping the given servlet part.
      Parameters:
      part - The Jakarta servlet part to wrap.
  • Method Details

    • getContentType

      public String getContentType()
      Description copied from interface: OorianUploadPart
      Returns the content type of this part.
      Specified by:
      getContentType in interface OorianUploadPart
      Returns:
      the content type
    • getInputStream

      public InputStream getInputStream() throws IOException
      Description copied from interface: OorianUploadPart
      Returns an input stream for reading the content of this part.
      Specified by:
      getInputStream in interface OorianUploadPart
      Returns:
      the input stream
      Throws:
      IOException - if an I/O error occurs
    • getName

      public String getName()
      Description copied from interface: OorianUploadPart
      Returns the name of this part (the form field name).
      Specified by:
      getName in interface OorianUploadPart
      Returns:
      the part name
    • getHeader

      public String getHeader(String name)
      Description copied from interface: OorianUploadPart
      Returns the value of the specified header for this part.
      Specified by:
      getHeader in interface OorianUploadPart
      Parameters:
      name - the header name
      Returns:
      the header value, or null if not present
    • getDelegate

      public jakarta.servlet.http.Part getDelegate()
      Returns the underlying Jakarta servlet part.
      Returns:
      The wrapped Part.