Class RestUploadParser
- java.lang.Object
-
- com.github.elopteryx.upload.internal.AbstractUploadParser
-
- com.github.elopteryx.upload.internal.BlockingUploadParser
-
- com.github.elopteryx.upload.rs.internal.RestUploadParser
-
public class RestUploadParser extends com.github.elopteryx.upload.internal.BlockingUploadParserA subclass of the blocking parser. It doesn't have a dependency on the servlet request and can be initialized from the header values. This makes it ideal for a Jax-Rs environment, to be used in a message body reader.
-
-
Constructor Summary
Constructors Constructor Description RestUploadParser()Public constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MultiPartImpldoBlockingParse(long contentLength, String mimeType, String encoding, InputStream stream)Initializes the parser from the given parameters and performs a blocking parse.-
Methods inherited from class com.github.elopteryx.upload.internal.BlockingUploadParser
blockingRead, doBlockingParse
-
-
-
-
Method Detail
-
doBlockingParse
public MultiPartImpl doBlockingParse(long contentLength, String mimeType, String encoding, InputStream stream) throws IOException
Initializes the parser from the given parameters and performs a blocking parse.- Parameters:
contentLength- The length of the requestmimeType- The content type of the requestencoding- The character encoding of the requeststream- The request stream- Returns:
- The multipart object, representing the request
- Throws:
IOException- If an error occurred with the I/O
-
-