if (log.isTraceEnabled()) {
log.trace("Offset: " + offset + ", len=" + len + ", size=" + size);
}
read = socket.getInputStream().read(result, offset, len);
} catch (IOException e) {
throw new TransportException(e);
}
if (read == -1) {
throw new RuntimeException("End of stream reached!");
}
if (read + offset == size) {