buffer.clear();
}
// The thread might block when reading more bytes using
// a temporary Selector.
ByteBufferInputStream inputStream =
new ByteBufferInputStream();
inputStream.setSecure((prot == Protocol.TLS));
inputStream.setSelectionKey(ctx.getSelectionKey());
inputStream.setReadTimeout(requestTimeOut * 1000);
int nRead = inputStream.read(buffer);
if (nRead <= 0) {
logger.log(Level.SEVERE,
"sip.network.grizzly.readtimeout",
new Object[]{requestTimeOut, nRead, buffer});
if (logger.isLoggable(Level.FINE)) {