Class BatchParserCommon
java.lang.Object
org.apache.olingo.server.core.deserializer.batch.BatchParserCommon
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidconsumeBlankLine(List<Line> remainingMessage, boolean isStrict) static HeaderconsumeHeaders(List<Line> remainingMessage) static InputStreamconvertLineListToInputStream(List<Line> messageList, Charset charset) static InputStreamconvertLineListToInputStream(List<Line> list, Charset charset, int length) static StringgetBoundary(String contentType, int line) static ContentTypeparseContentType(String contentType, ContentType expected, int line) Get the content type based oncontentTypeparameter.static LineremoveEndingCRLF(Line line) splitMessageByBoundary(List<Line> message, String boundary) static StringtrimLineListToLength(List<Line> list, int length)
-
Field Details
-
CONTENT_TRANSFER_ENCODING
- See Also:
-
BOUNDARY
- See Also:
-
BINARY_ENCODING
- See Also:
-
-
Method Details
-
getBoundary
- Throws:
BatchDeserializerException
-
parseContentType
public static ContentType parseContentType(String contentType, ContentType expected, int line) throws BatchDeserializerException Get the content type based oncontentTypeparameter. If this content type is not compatible to the expected ContentType a BatchDeserializerException is thrown.- Parameters:
contentType- content type string which is parsedexpected- content type to which the parsed must be compatibleline- parsed line- Returns:
- the parsed content type or if not compatible or parseable an exception is thrown (never returns null)
- Throws:
BatchDeserializerException
-
splitMessageByBoundary
public static List<List<Line>> splitMessageByBoundary(List<Line> message, String boundary) throws BatchDeserializerException - Throws:
BatchDeserializerException
-
removeEndingCRLF
-
consumeHeaders
-
consumeBlankLine
public static void consumeBlankLine(List<Line> remainingMessage, boolean isStrict) throws BatchDeserializerException - Throws:
BatchDeserializerException
-
convertLineListToInputStream
-
trimLineListToLength
-
convertLineListToInputStream
public static InputStream convertLineListToInputStream(List<Line> list, Charset charset, int length)
-