Ensures that at least a nbytes are readable from the given buffer. If there aren't enough bytes in the buffer this will raise an exception and cause the ReplayingDecoder to undo whatever we did thus far so we can wait until we read more from the socket. @param buf Buffer to check. @p
(final ChannelBuffer buf, final int nbytes)
| 1593 | * @param nbytes Number of bytes desired. |
| 1594 | */ |
| 1595 | private static void ensureReadable(final ChannelBuffer buf, final int nbytes) { |
| 1596 | buf.markReaderIndex(); |
| 1597 | buf.skipBytes(nbytes); |
| 1598 | buf.resetReaderIndex(); |
| 1599 | } |
| 1600 | |
| 1601 | /** |
| 1602 | * De-serializes an RPC response. |
no outgoing calls
no test coverage detected