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 ContentType |
parseContentType(String contentType,
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 BatchDeserializerException
BatchDeserializerExceptionpublic static ContentType parseContentType(String contentType, ContentType expected, int line) throws 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 lineBatchDeserializerExceptionpublic static List<List<Line>> splitMessageByBoundary(List<Line> message, String boundary) throws BatchDeserializerException
BatchDeserializerExceptionpublic static void consumeBlankLine(List<Line> remainingMessage, boolean isStrict) throws BatchDeserializerException
BatchDeserializerExceptionpublic static InputStream convertLineListToInputStream(List<Line> messageList, Charset charset)
public static InputStream convertLineListToInputStream(List<Line> list, Charset charset, int length)
Copyright © 2023. All rights reserved.