JCLOUDS-629: SshjSshClient Payload without length

sshj treats -1 as an unknown length and uses a less efficient copying
mechanism.
This commit is contained in:
Andrew Gaul 2014-07-15 10:11:32 -07:00
parent a8b106c2bb
commit 086fb9c728

View File

@ -318,7 +318,8 @@ public class SshjSshClient implements SshClient {
@Override @Override
public long getLength() { public long getLength() {
return contents.getContentMetadata().getContentLength(); Long length = contents.getContentMetadata().getContentLength();
return length != null ? length : -1;
} }
@Override @Override