Class BatchParserCommon

java.lang.Object
org.apache.olingo.odata2.core.batch.v2.BatchParserCommon

public class BatchParserCommon extends Object
  • Field Details

    • PATTERN_HEADER_LINE

      protected static final Pattern PATTERN_HEADER_LINE
    • PATTERN_MULTIPART_MIXED

      public static final Pattern PATTERN_MULTIPART_MIXED
    • PATTERN_CONTENT_TYPE_APPLICATION_HTTP

      public static final Pattern PATTERN_CONTENT_TYPE_APPLICATION_HTTP
    • PATTERN_RELATIVE_URI

      public static final Pattern PATTERN_RELATIVE_URI
  • Method Details

    • trimLineListToLength

      public static String trimLineListToLength(List<Line> list, int length)
    • lineListToString

      public static String lineListToString(List<Line> list)
    • 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 (see 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.
      Parameters:
      contentType - content type value
      operation - which is written into the InputStream
      contentLength - 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

      public static Line removeEndingCRLF(Line line)
    • consumeHeaders

      public static Header consumeHeaders(List<Line> remainingMessage) throws BatchException
      Throws:
      BatchException
    • consumeBlankLine

      public static void consumeBlankLine(List<Line> remainingMessage, boolean isStrict) throws BatchException
      Throws:
      BatchException
    • getBoundary

      public static String getBoundary(String contentType, int line) throws BatchException
      Throws:
      BatchException
    • parseQueryParameter

      public static Map<String,List<String>> parseQueryParameter(Line httpRequest)