Handle p = handles.get(handle);
if (!(p instanceof FileHandle)) {
sendStatus(id, SSH_FX_INVALID_HANDLE, handle);
} else {
SshFile ssh = ((FileHandle) p).getFile();
InputStream is = ssh.createInputStream(offset);
try {
byte[] b = new byte[Math.max(len, 1024 * 32)];
len = is.read(b);
if (len >= 0) {
Buffer buf = new Buffer(len + 5);