if (trace) {
log.tracef("Offset: %d, len=%d, size=%d", offset, len, size);
}
read = socketInputStream.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) {