public class ODataBatchUtilities extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ODataBatchUtilities.BatchItemType |
| Constructor and Description |
|---|
ODataBatchUtilities() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addHeaderLine(String headerLine,
Map<String,Collection<String>> targetMap)
Parses and adds the given header line to the given target map.
|
static String |
getBoundaryFromHeader(Collection<String> contentType)
Retrieved batch boundary from the given content-type header values.
|
static ODataBatchUtilities.BatchItemType |
getItemType(Map<String,Collection<String>> headers)
Retrieves item type from item headers.
|
static Map<String,Collection<String>> |
nextItemHeaders(org.apache.olingo.client.api.communication.request.batch.ODataBatchLineIterator iterator,
String boundary)
Retrieves headers of the next batch item.
|
static String |
readBatchPart(ODataBatchController batchController,
boolean checkCurrent)
Reads batch part taking source and delimiter (boundary) from given batch controller.
|
static String |
readBatchPart(ODataBatchController batchController,
int count)
Reads the given number of line from the given batch wrapped into the batch controller.
|
static String |
readBatchPart(ODataBatchController controller,
OutputStream os,
boolean checkCurrent)
Reads batch part taking source and delimiter (boundary) from given batch controller.
|
static String |
readBatchPart(ODataBatchController controller,
OutputStream os,
int count,
boolean checkCurrent)
Reads batch part taking source and delimiter (boundary) from given batch controller.
|
static Map<String,Collection<String>> |
readHeaders(org.apache.olingo.client.api.communication.request.batch.ODataBatchLineIterator iterator)
Reads headers from the batch starting from the given position.
|
static void |
readHeaders(org.apache.olingo.client.api.communication.request.batch.ODataBatchLineIterator iterator,
Map<String,Collection<String>> target)
Reads headers from the batch starting from the given position.
|
static Map.Entry<Integer,String> |
readResponseLine(org.apache.olingo.client.api.communication.request.batch.ODataBatchLineIterator iterator)
Retrieves response line from the given position.
|
public static String readBatchPart(ODataBatchController batchController, boolean checkCurrent)
Usually used to consume/discard useless lines.
batchController - batch controller.checkCurrent - if 'TRUE' the current line will be included into the delimiter verification.public static String readBatchPart(ODataBatchController batchController, int count)
Usually used to consume/discard useless lines.
batchController - batch controller.count - number of batch line to be read.public static String readBatchPart(ODataBatchController controller, OutputStream os, boolean checkCurrent)
Usually used to read an entire batch part.
controller - batch controller.os - destination stream of batch part (null to discard).checkCurrent - if 'TRUE' the current line will be included into the delimiter verification.public static String readBatchPart(ODataBatchController controller, OutputStream os, int count, boolean checkCurrent)
Usually used to read an entire batch part.
controller - batch controller.os - destination stream of batch part (null to discard).count - number of batch line to be read.checkCurrent - if 'TRUE' the current line will be included into the delimiter verification.public static Map<String,Collection<String>> readHeaders(org.apache.olingo.client.api.communication.request.batch.ODataBatchLineIterator iterator)
iterator - batch iterator.public static void readHeaders(org.apache.olingo.client.api.communication.request.batch.ODataBatchLineIterator iterator,
Map<String,Collection<String>> target)
Retrieved headers will be added to the map given by target parameter.
iterator - batch iterator.target - destination of the retrieved headers.public static void addHeaderLine(String headerLine, Map<String,Collection<String>> targetMap)
headerLine - header line to be added.targetMap - target map.public static String getBoundaryFromHeader(Collection<String> contentType)
contentType - content-types.public static Map.Entry<Integer,String> readResponseLine(org.apache.olingo.client.api.communication.request.batch.ODataBatchLineIterator iterator)
iterator - batch iterator.public static Map<String,Collection<String>> nextItemHeaders(org.apache.olingo.client.api.communication.request.batch.ODataBatchLineIterator iterator, String boundary)
iterator - batch line iterator.boundary - batch boundary.public static ODataBatchUtilities.BatchItemType getItemType(Map<String,Collection<String>> headers)
headers - batch item headers.Copyright © 2013–2017 The Apache Software Foundation. All rights reserved.