Class MultipartInputImpl.PartImpl

java.lang.Object
org.jboss.resteasy.plugins.providers.multipart.MultipartInputImpl.PartImpl
All Implemented Interfaces:
InputPart
Enclosing class:
MultipartInputImpl

public class MultipartInputImpl.PartImpl extends Object implements InputPart
Version:
$Revision: 1 $
Author:
Bill Burke
  • Constructor Details

    • PartImpl

      public PartImpl(org.apache.james.mime4j.message.BodyPart bodyPart)
  • Method Details

    • setMediaType

      public void setMediaType(jakarta.ws.rs.core.MediaType mediaType)
      Description copied from interface: InputPart
      Change the media type of the body part before you extract it. Useful for specifying a charset.
      Specified by:
      setMediaType in interface InputPart
      Parameters:
      mediaType - media type
    • getBody

      public <T> T getBody(Class<T> type, Type genericType) throws IOException
      Specified by:
      getBody in interface InputPart
      Throws:
      IOException
    • getBody

      public <T> T getBody(jakarta.ws.rs.core.GenericType<T> type) throws IOException
      Specified by:
      getBody in interface InputPart
      Throws:
      IOException
    • getBody

      public InputStream getBody() throws IOException
      Description copied from interface: InputPart
      Returns the body content as an input stream.
      Specified by:
      getBody in interface InputPart
      Returns:
      the body content
      Throws:
      IOException - if an error occurs reading the content
    • getBodyAsString

      public String getBodyAsString() throws IOException
      Specified by:
      getBodyAsString in interface InputPart
      Throws:
      IOException
    • getFileName

      public String getFileName()
      Description copied from interface: InputPart
      Returns the filename parameter of the content disposition of this Entity.
      Specified by:
      getFileName in interface InputPart
      Returns:
      the filename or null if one does not exist
    • getHeaders

      public jakarta.ws.rs.core.MultivaluedMap<String,String> getHeaders()
      Specified by:
      getHeaders in interface InputPart
      Returns:
      headers of this part
    • getMediaType

      public jakarta.ws.rs.core.MediaType getMediaType()
      Specified by:
      getMediaType in interface InputPart
      Returns:
      "Content-Type" of this part
    • isContentTypeFromMessage

      public boolean isContentTypeFromMessage()
      Specified by:
      isContentTypeFromMessage in interface InputPart
      Returns:
      true if the Content-Type was resolved from the message, false if it was resolved from the server default