136137138139140141142143144145146
public ByteBuffer getRecordDataBuffer() throws IOException { final ByteBuffer b = this.getRecordBuffer(); final int start = offset + getRecordHeaderLength(); final int length = (int) b.limit() - start; b.limit(start + length); b.position(start); return b;
138139140141142143144145146147148
final ByteBuffer b = this.getRecordBuffer(); final int start = offset + getRecordHeaderLength(); final int length = (int) b.limit() - start; b.limit(start + length); b.position(start); return b; }
154155156157158159160161162163164
public final ByteBuffer getRecordHeaderBuffer() throws IOException { final ByteBuffer b = this.getRecordBuffer(); final int start = offset; final int length = this.getRecordHeaderLength(); b.limit(start + length); b.position(start); return b; }
164165166167168169170171172173174
public abstract int getRecordHeaderLength(); public long getRecordLength() throws IOException { final ByteBuffer b = getRecordBuffer(); final int length = (int) b.limit() - b.position(); return length; } public final long getRecordStart() {
110111112113114115116117118119120
ByteBuffer b = ByteBuffer.allocate(128); b.order(ByteOrder.LITTLE_ENDIAN); in.read(b, in.size() - b.remaining()); final long size = b.getInt(b.limit() - 4); in.close(); return size; }
125126127128129130131132133134135
ByteBuffer b = ByteBuffer.allocate(128); b.order(ByteOrder.LITTLE_ENDIAN); in.read(b, in.size() - b.remaining()); final long size = b.getInt(b.limit() - 8); in.close(); return (size < 0 ? ((long) Integer.MAX_VALUE )* 2L + 1 + size : size); }
850851852853854855856857858859860
if (p + MAX_HEADER_LENGTH > view.capacity()) { break; } view.limit(p + MAX_HEADER_LENGTH); view.position(p); } return status; }
12281229123012311232123312341235123612371238
* @return a byte buffer that is wrapped around this buffers data */ public ByteBuffer toByteBuffer() { ByteBuffer b = delagate.duplicate(); b.limit(delagate.limit()); b.position(delagate.position()); return b; }
236237238239240241242243244245246
*/ public ByteBuffer getRecordDataBuffer() throws IOException { final ByteBuffer b = this.getRecordByteBuffer(); final int start = offset + getRecordHeaderLength(); final int length = b.limit() - start; b.limit(start + length); b.position(start); return b;
238239240241242243244245246247248
final ByteBuffer b = this.getRecordByteBuffer(); final int start = offset + getRecordHeaderLength(); final int length = b.limit() - start; b.limit(start + length); b.position(start); return b; }