> + * <BlockList>
> + * <Committed>first-base64-encoded-block-id</Committed>
> + * <Uncommitted>second-base64-encoded-block-id</Uncommitted>
> + * <Latest>third-base64-encoded-block-id</Latest>
> + * ...
> + * </BlockList>
> + */
> +public class BindAzureBlocksToRequest implements Binder {
> + @Override
> + public <R extends HttpRequest> R bindToRequest(R request, Object input) {
> + List<String> blockIds = (List<String>)input;
> + StringBuilder latestIds = new StringBuilder();
> + for (String id : blockIds) {
> + latestIds.append("<Latest>").append(id).append("</Latest>");
> + }
> + final String content = String.format("<?xml version=\"1.0\"
> encoding=\"UTF-8\"?>\n" +
Can you build this without String.format, perhaps by appending the prologue
first?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/52/files#r5101657