to.lastModified(from.getLastModified());
long bytes = from.getContentMetadata().getContentLength();
String contentType = from.getContentMetadata().getContentType();
to.payload(payload(bytes, contentType));
to.metadata(from.getUserMetadata());
return to.build();
}
private static Payload payload(long bytes, String contentType) {
Payload payload = Payloads.newByteSourcePayload(ByteSource.empty());
payload.getContentMetadata().setContentLength(bytes);