> @@ -158,9 +158,8 @@ private Blob createUpdatedCopyOfBlobInContainer(String > containerName, Blob in) { > try { > if (payload == null || !(payload instanceof ByteArrayPayload)) { > MutableContentMetadata oldMd = > in.getPayload().getContentMetadata(); > - ByteArrayOutputStream out = new ByteArrayOutputStream(); > - in.getPayload().writeTo(out); > - payload = (ByteArrayPayload) > Payloads.calculateMD5(Payloads.newPayload(out.toByteArray())); > + byte[] out = ByteStreams.toByteArray(in.getPayload()); > + payload = (ByteArrayPayload) > Payloads.calculateMD5(Payloads.newPayload(out));
If I understand correctly, there's no difference in terms of memory allocation here? I.e. we need a byte array in memory for the _whole_ payload in both cases... --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/301/files#r9899090