/** * @param clazz * @param url * @param startIndex * @param numberResults * @return the batch job response with pagination * @throws Exception */ public <T> T deserializeBatchJobMutateResults( Class<T> clazz, URL url, int startIndex, int numberResults) throws Exception { // Build a wrapped input stream from the response. InputStream wrappedStream = batchJobHelperUtility.buildWrappedByteSource(url, startIndex, numberResults).openStream(); return new JaxBDeserializer<>(clazz).deserialize(new StreamSource(wrappedStream)); } }
ByteSource.concat( ByteSource.wrap(SOAP_START_BODY.getBytes(UTF_8)), batchJobHelperUtility.buildWrappedByteSource(url, startIndex, numberResults), ByteSource.wrap(SOAP_END_BODY.getBytes(UTF_8))) .openStream();
ByteSource.concat( ByteSource.wrap(SOAP_START_BODY.getBytes(UTF_8)), batchJobHelperUtility.buildWrappedByteSource(url, startIndex, numberResults), ByteSource.wrap(SOAP_END_BODY.getBytes(UTF_8))) .openStream();