@Override public void writeInt(int n) throws IOException { int val = (n << 1) ^ (n >> 31); if ((val & ~0x7F) == 0) { out.write(val); return; } else if ((val & ~0x3FFF) == 0) { out.write(0x80 | val); out.write(val >>> 7); return; } int len = BinaryData.encodeInt(n, buf, 0); out.write(buf, 0, len); }
@Override public void writeInt(int n) throws IOException { int val = (n << 1) ^ (n >> 31); if ((val & ~0x7F) == 0) { out.write(val); return; } else if ((val & ~0x3FFF) == 0) { out.write(0x80 | val); out.write(val >>> 7); return; } int len = BinaryData.encodeInt(n, buf, 0); out.write(buf, 0, len); }
@Override public void writeIndex(int unionIndex) throws IOException { ensureBounds(5); pos += BinaryData.encodeInt(unionIndex, buf, pos); }
@Override public void writeInt(int n) throws IOException { ensureBounds(5); pos += BinaryData.encodeInt(n, buf, pos); }
@Override public void writeInt(int n) throws IOException { ensureBounds(5); pos += BinaryData.encodeInt(n, buf, pos); }
@Override public void writeInt(int n) throws IOException { ensureBounds(5); pos += BinaryData.encodeInt(n, buf, pos); }
@Override public void writeInt(int n) throws IOException { ensureBounds(5); pos += BinaryData.encodeInt(n, buf, pos); }
@Override public void writeIndex(int unionIndex) throws IOException { ensureBounds(5); pos += BinaryData.encodeInt(unionIndex, buf, pos); }
@Override public void writeInt(int n) throws IOException { int val = (n << 1) ^ (n >> 31); if ((val & ~0x7F) == 0) { out.write(val); return; } else if ((val & ~0x3FFF) == 0) { out.write(0x80 | val); out.write(val >>> 7); return; } int len = BinaryData.encodeInt(n, buf, 0); out.write(buf, 0, len); }
@Override public void writeInt(int n) throws IOException { int val = (n << 1) ^ (n >> 31); if ((val & ~0x7F) == 0) { out.write(val); return; } else if ((val & ~0x3FFF) == 0) { out.write(0x80 | val); out.write(val >>> 7); return; } int len = BinaryData.encodeInt(n, buf, 0); out.write(buf, 0, len); }
@Override public void writeInt(int n) throws IOException { ensureBounds(5); pos += BinaryData.encodeInt(n, buf, pos); }
@Override public void writeIndex(int unionIndex) throws IOException { ensureBounds(5); pos += BinaryData.encodeInt(unionIndex, buf, pos); }
@Override public void writeIndex(int unionIndex) throws IOException { ensureBounds(5); pos += BinaryData.encodeInt(unionIndex, buf, pos); }
@Override public void writeInt(int n) throws IOException { ensureBounds(5); pos += BinaryData.encodeInt(n, buf, pos); }
@Override public void writeInt(int n) throws IOException { ensureBounds(5); pos += BinaryData.encodeInt(n, buf, pos); }
@Override public void writeInt(int n) throws IOException { ensureBounds(5); pos += BinaryData.encodeInt(n, buf, pos); }