Class BatchParserCommon
java.lang.Object
org.apache.olingo.odata2.core.batch.v2.BatchParserCommon
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidconsumeBlankLine(List<Line> remainingMessage, boolean isStrict) static HeaderconsumeHeaders(List<Line> remainingMessage) static InputStreamconvertToInputStream(String contentType, BatchQueryOperation operation, int contentLength) Convert body in form of List of Line items into a InputStream.static StringgetBoundary(String contentType, int line) static StringlineListToString(List<Line> list) parseQueryParameter(Line httpRequest) static LineremoveEndingCRLF(Line line) static StringtrimLineListToLength(List<Line> list, int length)
-
Field Details
-
PATTERN_HEADER_LINE
-
PATTERN_MULTIPART_MIXED
-
PATTERN_CONTENT_TYPE_APPLICATION_HTTP
-
PATTERN_RELATIVE_URI
-
-
Method Details
-
trimLineListToLength
-
lineListToString
-
convertToInputStream
public static InputStream convertToInputStream(String contentType, BatchQueryOperation operation, int contentLength) throws BatchException Convert body in form of List of Line items into a InputStream. The body is transformed with the charset set in ContentType and if no charset is set with Olingo default charset (seeBatchHelper.DEFAULT_CHARSET). If content length is a positive value the content is trimmed to according length. Otherwise the whole content is written into the InputStream.- Parameters:
contentType- content type valueoperation- which is written into the InputStreamcontentLength- if it is a positive value the content is trimmed to according length. Otherwise the whole content is written into the InputStream.- Returns:
- Content of BatchQueryOperation as InputStream in according charset and length
- Throws:
BatchException- if something goes wrong
-
removeEndingCRLF
-
consumeHeaders
- Throws:
BatchException
-
consumeBlankLine
public static void consumeBlankLine(List<Line> remainingMessage, boolean isStrict) throws BatchException - Throws:
BatchException
-
getBoundary
- Throws:
BatchException
-
parseQueryParameter
-