public class BatchParserCommon extends Object
| Modifier and Type | Field and Description |
|---|---|
static Pattern |
PATTERN_CONTENT_TYPE_APPLICATION_HTTP |
protected static Pattern |
PATTERN_HEADER_LINE |
static Pattern |
PATTERN_MULTIPART_MIXED |
static Pattern |
PATTERN_RELATIVE_URI |
| Modifier and Type | Method and Description |
|---|---|
static void |
consumeBlankLine(List<Line> remainingMessage,
boolean isStrict) |
static Header |
consumeHeaders(List<Line> remainingMessage) |
static InputStream |
convertToInputStream(String contentType,
BatchQueryOperation operation,
int contentLength)
Convert body in form of List of Line items into a InputStream.
|
static String |
getBoundary(String contentType,
int line) |
static String |
lineListToString(List<Line> list) |
static Map<String,List<String>> |
parseQueryParameter(Line httpRequest) |
static Line |
removeEndingCRLF(Line line) |
static String |
trimLineListToLength(List<Line> list,
int length) |
protected static final Pattern PATTERN_HEADER_LINE
public static final Pattern PATTERN_MULTIPART_MIXED
public static final Pattern PATTERN_CONTENT_TYPE_APPLICATION_HTTP
public static final Pattern PATTERN_RELATIVE_URI
public static InputStream convertToInputStream(String contentType, BatchQueryOperation operation, int contentLength) throws BatchException
BatchHelper.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.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.BatchException - if something goes wrongpublic static Header consumeHeaders(List<Line> remainingMessage) throws BatchException
BatchExceptionpublic static void consumeBlankLine(List<Line> remainingMessage, boolean isStrict) throws BatchException
BatchExceptionpublic static String getBoundary(String contentType, int line) throws BatchException
BatchExceptionCopyright © 2020. All rights reserved.