public ByteBuffer readBuf() {
		ByteBuffer buf = readBuf;
		buf.flip();
		buf.position(readPos);
		if (buf.remaining() == 0) {
			if (bufs.isEmpty()) {
				// There's nothing to read, so we won't return this buffer.
				// We can clear it just in case...
				readBuf.clear();
				readPos = 0;
				return null;
			} else {
				buf = bufs.remove();
			}
		}
		if (bufs.isEmpty()) {
			writeBuf = readBuf = ByteBuffer.allocate(BUF_LEN);
		} else {
			readBuf = bufs.remove();
		}
		readPos = 0;
		length -= buf.remaining();
		return buf;
	}