public class BatchParserCommon extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
BINARY_ENCODING |
protected static String |
BOUNDARY |
static String |
CONTENT_TRANSFER_ENCODING |
| Modifier and Type | Method and Description |
|---|---|
static void |
consumeBlankLine(List<Line> remainingMessage,
boolean isStrict) |
static Header |
consumeHeaders(List<Line> remainingMessage) |
static InputStream |
convertLineListToInputStream(List<Line> messageList,
Charset charset) |
static InputStream |
convertLineListToInputStream(List<Line> list,
Charset charset,
int length) |
static String |
getBoundary(String contentType,
int line) |
static org.apache.olingo.commons.api.format.ContentType |
parseContentType(String contentType,
org.apache.olingo.commons.api.format.ContentType expected,
int line)
Get the content type based on
contentType parameter. |
static Line |
removeEndingCRLF(Line line) |
static List<List<Line>> |
splitMessageByBoundary(List<Line> message,
String boundary) |
static String |
trimLineListToLength(List<Line> list,
int length) |
public static final String CONTENT_TRANSFER_ENCODING
protected static final String BOUNDARY
public static final String BINARY_ENCODING
public static String getBoundary(String contentType, int line) throws org.apache.olingo.server.api.deserializer.batch.BatchDeserializerException
org.apache.olingo.server.api.deserializer.batch.BatchDeserializerExceptionpublic static org.apache.olingo.commons.api.format.ContentType parseContentType(String contentType, org.apache.olingo.commons.api.format.ContentType expected, int line) throws org.apache.olingo.server.api.deserializer.batch.BatchDeserializerException
contentType parameter.
If this content type is not compatible to the expected ContentType a
BatchDeserializerException is thrown.contentType - content type string which is parsedexpected - content type to which the parsed must be compatibleline - parsed lineorg.apache.olingo.server.api.deserializer.batch.BatchDeserializerExceptionpublic static List<List<Line>> splitMessageByBoundary(List<Line> message, String boundary) throws org.apache.olingo.server.api.deserializer.batch.BatchDeserializerException
org.apache.olingo.server.api.deserializer.batch.BatchDeserializerExceptionpublic static void consumeBlankLine(List<Line> remainingMessage, boolean isStrict) throws org.apache.olingo.server.api.deserializer.batch.BatchDeserializerException
org.apache.olingo.server.api.deserializer.batch.BatchDeserializerExceptionpublic static InputStream convertLineListToInputStream(List<Line> messageList, Charset charset)
public static InputStream convertLineListToInputStream(List<Line> list, Charset charset, int length)
Copyright © 2013–2015 The Apache Software Foundation. All rights reserved.