The corresponding buffer slice when successful, or null if there's not enough data available (Eof; Eob).
// create a buffer with some content auto buffer = new Buffer("hello world"); // consume everything unread auto slice = buffer.slice(buffer.this.readable());
Access buffer content.
Read a slice of data from the buffer, loading from the conduit as necessary. The specified number of bytes is sliced 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.
The slice cannot be larger than the size of the buffer: use method fill(void[]) instead where you simply want the content copied, or use conduit.read() to extract directly from an attached conduit Also if you need to retain the slice, then it should be .dup'd before the buffer is compressed or repopulated.