@Override
  public synchronized int write(final ByteBuffer src) throws IOException {
    final int bytesWritten = write(src, position);
    position += Math.max(0, bytesWritten);
    return bytesWritten;
  }
@Override
  public synchronized int write(final ByteBuffer src)