Class ServletCompletedFileUpload

java.lang.Object
io.micronaut.servlet.engine.ServletCompletedFileUpload
All Implemented Interfaces:
io.micronaut.http.multipart.CompletedFileUpload, io.micronaut.http.multipart.CompletedPart, io.micronaut.http.multipart.FileUpload, io.micronaut.http.multipart.PartData

public final class ServletCompletedFileUpload extends Object implements io.micronaut.http.multipart.CompletedFileUpload
An implementation of CompletedFileUpload that backs on a Servlet part.
Since:
1.0.0
Author:
graemerocher
  • Constructor Details

    • ServletCompletedFileUpload

      public ServletCompletedFileUpload(jakarta.servlet.http.Part part)
      Default constructor.
      Parameters:
      part - The part
  • Method Details

    • getContentType

      public Optional<io.micronaut.http.MediaType> getContentType()
      Specified by:
      getContentType in interface io.micronaut.http.multipart.FileUpload
      Specified by:
      getContentType in interface io.micronaut.http.multipart.PartData
    • getName

      public String getName()
      Specified by:
      getName in interface io.micronaut.http.multipart.CompletedPart
      Specified by:
      getName in interface io.micronaut.http.multipart.FileUpload
    • getFilename

      public String getFilename()
      Specified by:
      getFilename in interface io.micronaut.http.multipart.FileUpload
    • getSize

      public long getSize()
      Specified by:
      getSize in interface io.micronaut.http.multipart.FileUpload
    • getDefinedSize

      public long getDefinedSize()
      Specified by:
      getDefinedSize in interface io.micronaut.http.multipart.FileUpload
    • isComplete

      public boolean isComplete()
      Specified by:
      isComplete in interface io.micronaut.http.multipart.FileUpload
    • getInputStream

      public InputStream getInputStream() throws IOException
      Specified by:
      getInputStream in interface io.micronaut.http.multipart.PartData
      Throws:
      IOException
    • getBytes

      public byte[] getBytes() throws IOException
      Specified by:
      getBytes in interface io.micronaut.http.multipart.PartData
      Throws:
      IOException
    • getByteBuffer

      public ByteBuffer getByteBuffer() throws IOException
      Specified by:
      getByteBuffer in interface io.micronaut.http.multipart.PartData
      Throws:
      IOException