The corresponding buffer slice when successful, or null if there's not enough data available (Eof; Eob).
Remarks: Slices readable data. The specified number of bytes is readd from the buffer, and marked as having been read when the 'eat' parameter is set true. When 'eat' is set false, the read position is not adjusted.
Note that the slice cannot be larger than the size of the buffer ~ use method read(void[]) instead where you simply want the content copied.
Note also that the slice should be .dup'd if you wish to retain it.
// create a buffer with some content auto buffer = new Buffer ("hello world"); // consume everything unread auto slice = buffer.slice (buffer.readable);
Access buffer content.