122123124125126127128129130131132
BitBuffer b = getBuffer(); Header last = headers.getHeader(headers.size() - 1); int p = b.position() + last.getOffset() + last.getLength(); p = (p > b.limit() ? b.limit() : p); // Now position the buffer b.position(p); return b;