@Override protected void encode(OutputStream out) { if (packer != null && changes != null) { try { packer.write(out, changes); // signal the end of changes out.write(2); if (changes.wasFiltered()) { out.write(1); } else { out.write(0); } changes.close(); } catch (IOException ioe) { throw new RuntimeException (ioe); } } }