private ByteArrayOutputStream putIndirectId(ByteArrayOutputStream id) throws IOException { byte[] data = id.toByteArray(); id = new ByteArrayOutputStream(); // indirect: 2, total len (long), blockId (long) id.write(2); DataUtils.writeVarLong(id, length(data)); DataUtils.writeVarLong(id, writeBlock(data)); return id; }
/** * Write a variable size long. * * @param x the value * @return this */ public WriteBuffer putVarLong(long x) { DataUtils.writeVarLong(ensureCapacity(10), x); return this; }
DataUtils.writeVarLong(id, writeBlock(buff));
/** * Write a variable size long. * * @param x the value * @return this */ public WriteBuffer putVarLong(long x) { DataUtils.writeVarLong(ensureCapacity(10), x); return this; }
private ByteArrayOutputStream putIndirectId(ByteArrayOutputStream id) throws IOException { byte[] data = id.toByteArray(); id = new ByteArrayOutputStream(); // indirect: 2, total len (long), blockId (long) id.write(2); DataUtils.writeVarLong(id, length(data)); DataUtils.writeVarLong(id, writeBlock(data)); return id; }
/** * Write a variable size long. * * @param x the value * @return this */ public WriteBuffer putVarLong(long x) { DataUtils.writeVarLong(ensureCapacity(10), x); return this; }
/** * Write a variable size long. * * @param x the value * @return this */ public WriteBuffer putVarLong(long x) { DataUtils.writeVarLong(ensureCapacity(10), x); return this; }
private ByteArrayOutputStream putIndirectId(ByteArrayOutputStream id) throws IOException { byte[] data = id.toByteArray(); id = new ByteArrayOutputStream(); // indirect: 2, total len (long), blockId (long) id.write(2); DataUtils.writeVarLong(id, length(data)); DataUtils.writeVarLong(id, writeBlock(data)); return id; }
private ByteArrayOutputStream putIndirectId(ByteArrayOutputStream id) throws IOException { byte[] data = id.toByteArray(); id = new ByteArrayOutputStream(); // indirect: 2, total len (long), blockId (long) id.write(2); DataUtils.writeVarLong(id, length(data)); DataUtils.writeVarLong(id, writeBlock(data)); return id; }
DataUtils.writeVarLong(id, writeBlock(buff));
DataUtils.writeVarLong(id, writeBlock(buff));
DataUtils.writeVarLong(id, writeBlock(buff));