Class MultipartRelatedInputImpl
java.lang.Object
org.jboss.resteasy.plugins.providers.multipart.MultipartInputImpl
org.jboss.resteasy.plugins.providers.multipart.MultipartRelatedInputImpl
- All Implemented Interfaces:
ProvidersContextRetainer, MultipartInput, MultipartRelatedInput
Implements
MultipartRelatedInput by extending
MultipartInputImpl and adding multipart/related functionality.- Version:
- $Revision: 1 $
- Author:
- Attila Kiraly
-
Nested Class Summary
Nested classes/interfaces inherited from class MultipartInputImpl
MultipartInputImpl.PartImpl -
Field Summary
Fields inherited from class MultipartInputImpl
contentType, defaultPartCharset, defaultPartContentType, empty, parts, savedProviders, workers -
Constructor Summary
ConstructorsConstructorDescriptionMultipartRelatedInputImpl(jakarta.ws.rs.core.MediaType contentType, jakarta.ws.rs.ext.Providers workers) MultipartRelatedInputImpl(org.apache.james.mime4j.dom.Multipart multipart, jakarta.ws.rs.ext.Providers workers) -
Method Summary
Modifier and TypeMethodDescriptionprotected InputPartextractPart(org.apache.james.mime4j.message.BodyPart bodyPart) getStart()A start parameter is not mandatory in a message.Optional.getType()The type parameter as it was read from the content-type header of the multipart/related message.voidparse(InputStream is) Methods inherited from class MultipartInputImpl
addHeaderToHeadlessStream, close, createHeaderInputStream, extractParts, getCharset, getMimeMessage, getParts, getPreamble, main, setProvidersMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface MultipartInput
close, getParts, getPreamble
-
Constructor Details
-
MultipartRelatedInputImpl
public MultipartRelatedInputImpl(jakarta.ws.rs.core.MediaType contentType, jakarta.ws.rs.ext.Providers workers) -
MultipartRelatedInputImpl
public MultipartRelatedInputImpl(org.apache.james.mime4j.dom.Multipart multipart, jakarta.ws.rs.ext.Providers workers) throws IOException - Throws:
IOException
-
-
Method Details
-
parse
- Overrides:
parsein classMultipartInputImpl- Throws:
IOException
-
extractPart
protected InputPart extractPart(org.apache.james.mime4j.message.BodyPart bodyPart) throws IOException - Overrides:
extractPartin classMultipartInputImpl- Throws:
IOException
-
getRelatedMap
- Specified by:
getRelatedMapin interfaceMultipartRelatedInput- Returns:
- a map holding all parts with their unique id-s as keys. The root part and the related parts too.
-
getRootPart
- Specified by:
getRootPartin interfaceMultipartRelatedInput- Returns:
- the root part of the message. If a start parameter was set in the message header the part with that id is returned. If no start parameter was set the first part is returned.
-
getStart
Description copied from interface:MultipartRelatedInputA start parameter is not mandatory in a message. If it is presented it holds the id of the root part.- Specified by:
getStartin interfaceMultipartRelatedInput- Returns:
- the start parameter of the content-type header of the message, null if there was no such parameter
-
getStartInfo
Description copied from interface:MultipartRelatedInputOptional.- Specified by:
getStartInfoin interfaceMultipartRelatedInput- Returns:
- the start-info parameter of the content-type header of the message, null if there was no such parameter
-
getType
Description copied from interface:MultipartRelatedInputThe type parameter as it was read from the content-type header of the multipart/related message. A well formed multipart/related message always has this parameter. This is the type of the root part of the message. If a content-type header is presented in the root part as well it should hold the same value.- Specified by:
getTypein interfaceMultipartRelatedInput- Returns:
- the type parameter of the content-type header of the message, null if there was no such parameter
-