@Override public void writeInt(int n) throws IOException { if (pos + 5 > buf.length) { ensure(5); } pos = encodeLong(n, buf, pos); assert check(); }
@Override public void writeIndex(int unionIndex) throws IOException { if (pos + 5 > buf.length) { ensure(5); } pos = encodeLong(unionIndex, buf, pos); assert check(); }
@Override public void writeLong(long n) throws IOException { if (pos + 10 > buf.length) { ensure(10); } pos = encodeLong(n, buf, pos); assert check(); }
encodeLong(-(s.items - 1), out); encodeLong(s.lastFullItem - s.start, out); out.write(buf, s.start, s.lastFullItem - s.start); s.start = s.lastFullItem; encodeLong(1, out);
@Override public void writeInt(int n) throws IOException { if (pos + 5 > buf.length) { ensure(5); } pos = encodeLong(n, buf, pos); assert check(); }
encodeLong(-(s.items - 1), out); encodeLong(s.lastFullItem - s.start, out); out.write(buf, s.start, s.lastFullItem - s.start); s.start = s.lastFullItem; encodeLong(1, out);
@Override public void writeIndex(int unionIndex) throws IOException { if (pos + 5 > buf.length) { ensure(5); } pos = encodeLong(unionIndex, buf, pos); assert check(); }
@Override public void writeLong(long n) throws IOException { if (pos + 10 > buf.length) { ensure(10); } pos = encodeLong(n, buf, pos); assert check(); }
@Override public void writeBytes(byte[] bytes, int start, int len) throws IOException { if (pos + 5 > buf.length) { ensure(5); } pos = encodeLong(len, buf, pos); doWriteBytes(bytes, start, len); assert check(); }
@Override public void writeBytes(byte[] bytes, int start, int len) throws IOException { if (pos + 5 > buf.length) { ensure(5); } pos = encodeLong(len, buf, pos); doWriteBytes(bytes, start, len); assert check(); }
blockStack[stackTop - 1].state encodeLong(-t.items, out); encodeLong(byteCount, out); } else { encodeLong(-t.items, encoderBuffer); encodeLong(byteCount, encoderBuffer); final int headerSize = encoderBuffer.length(); if (buf.length >= pos + headerSize) {
blockStack[stackTop - 1].state encodeLong(-t.items, out); encodeLong(byteCount, out); } else { encodeLong(-t.items, encoderBuffer); encodeLong(byteCount, encoderBuffer); final int headerSize = encoderBuffer.length(); if (buf.length >= pos + headerSize) {