Works perfect with Sshj with the folling code:
val toUpload = "Some text"
val byteSource = ByteSource.wrap(toUpload.getBytes("UTF-8"))
val payload = Payloads.newByteSourcePayload(byteSource)
sshClient.put("testfile",payload)
Previously had to set content-length with ByteSource.size which is I/O heavy.
Can now omit the following
payload.getContentMetadata.setContentLength(toUpload.getBytes.size)
Please merge this in!
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/441#issuecomment-49071861