Class MultipartInputImpl
- java.lang.Object
-
- org.jboss.resteasy.plugins.providers.multipart.MultipartInputImpl
-
- All Implemented Interfaces:
ProvidersContextRetainer
,MultipartInput
- Direct Known Subclasses:
MultipartFormDataInputImpl
,MultipartRelatedInputImpl
public class MultipartInputImpl extends Object implements MultipartInput, ProvidersContextRetainer
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
MultipartInputImpl.PartImpl
-
Field Summary
Fields Modifier and Type Field Description protected javax.ws.rs.core.MediaType
contentType
protected String
defaultPartCharset
protected javax.ws.rs.core.MediaType
defaultPartContentType
protected static Annotation[]
empty
protected org.apache.james.mime4j.dom.Message
mimeMessage
protected List<InputPart>
parts
protected javax.ws.rs.ext.Providers
savedProviders
protected javax.ws.rs.ext.Providers
workers
-
Constructor Summary
Constructors Constructor Description MultipartInputImpl(javax.ws.rs.core.MediaType contentType, javax.ws.rs.ext.Providers workers)
MultipartInputImpl(javax.ws.rs.core.MediaType contentType, javax.ws.rs.ext.Providers workers, javax.ws.rs.core.MediaType defaultPartContentType, String defaultPartCharset)
MultipartInputImpl(org.apache.james.mime4j.dom.Multipart multipart, javax.ws.rs.ext.Providers workers)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected InputStream
addHeaderToHeadlessStream(InputStream is)
void
close()
Call this method to delete any temporary files created from unmarshalling this multipart message Otherwise they will be deleted on Garbage Collection or JVM exit.protected InputStream
createHeaderInputStream()
protected InputPart
extractPart(org.apache.james.mime4j.message.BodyPart bodyPart)
protected void
extractParts()
protected void
finalize()
protected String
getCharset(javax.ws.rs.core.MediaType mediaType)
List<InputPart>
getParts()
String
getPreamble()
static void
main(String[] args)
void
parse(InputStream is)
void
setProviders(javax.ws.rs.ext.Providers providers)
-
-
-
Field Detail
-
contentType
protected javax.ws.rs.core.MediaType contentType
-
workers
protected javax.ws.rs.ext.Providers workers
-
mimeMessage
protected org.apache.james.mime4j.dom.Message mimeMessage
-
empty
protected static final Annotation[] empty
-
defaultPartContentType
protected javax.ws.rs.core.MediaType defaultPartContentType
-
defaultPartCharset
protected String defaultPartCharset
-
savedProviders
protected javax.ws.rs.ext.Providers savedProviders
-
-
Constructor Detail
-
MultipartInputImpl
public MultipartInputImpl(javax.ws.rs.core.MediaType contentType, javax.ws.rs.ext.Providers workers)
-
MultipartInputImpl
public MultipartInputImpl(javax.ws.rs.core.MediaType contentType, javax.ws.rs.ext.Providers workers, javax.ws.rs.core.MediaType defaultPartContentType, String defaultPartCharset)
-
MultipartInputImpl
public MultipartInputImpl(org.apache.james.mime4j.dom.Multipart multipart, javax.ws.rs.ext.Providers workers) throws IOException
- Throws:
IOException
-
-
Method Detail
-
parse
public void parse(InputStream is) throws IOException
- Throws:
IOException
-
addHeaderToHeadlessStream
protected InputStream addHeaderToHeadlessStream(InputStream is) throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
-
createHeaderInputStream
protected InputStream createHeaderInputStream() throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
-
getPreamble
public String getPreamble()
- Specified by:
getPreamble
in interfaceMultipartInput
-
getParts
public List<InputPart> getParts()
- Specified by:
getParts
in interfaceMultipartInput
-
extractParts
protected void extractParts() throws IOException
- Throws:
IOException
-
extractPart
protected InputPart extractPart(org.apache.james.mime4j.message.BodyPart bodyPart) throws IOException
- Throws:
IOException
-
close
public void close()
Description copied from interface:MultipartInput
Call this method to delete any temporary files created from unmarshalling this multipart message Otherwise they will be deleted on Garbage Collection or JVM exit.- Specified by:
close
in interfaceMultipartInput
-
finalize
protected void finalize() throws Throwable
-
getCharset
protected String getCharset(javax.ws.rs.core.MediaType mediaType)
-
setProviders
public void setProviders(javax.ws.rs.ext.Providers providers)
- Specified by:
setProviders
in interfaceProvidersContextRetainer
-
-