@Override
 public final synchronized void close() {
   if (!closed) {
     queue.add(os.toByteSource());
     closed = true;
   }
 }
 @Override
 public void write(byte[] b, int off, int len) throws IOException {
   os.write(b, off, len);
 }
 @Override
 public void write(int b) throws IOException {
   os.write(b);
 }