JSONCodeTableWriter implements VCDiffCodeTableWriter<Appendable> { public void copy(int offset, int size) { if (opcodeAdded) { output.append(','); } output.append(offset); output.append(','); output.append(size); opcodeAdded = true; } JSONCodeTableWriter(); void init(int dictionarySize); void add(final byte[] data, final int offset, final int length); void addChecksum(int checksum); void copy(int offset, int size); void finishEncoding(Appendable out); void output(Appendable out); void run(int size, byte b); @SuppressWarnings("deprecation") void writeHeader(Appendable out, EnumSet<VCDiffFormatExtension> formatExtensions);  }
@Test public void Copy() throws IOException { coder_.copy(3, 5); coder_.output(writer); coder_.finishEncoding(writer); assertEquals("[3,5]", writer.toString()); }