private void writeOutputData(byte[] data,int offset,int len) throws IOException {
  cbLock.lock();
  try {
    ios.write(data,offset,len);
  }
  finally {
    cbLock.unlock();
  }
}

private void writeOutputData ( byte [ ] data , int offset , int len ) throws IOException { cbLock . lock ( ) ; try { ios . write ( data , offset , len ) ; } finally { cbLock . unlock ( ) ; } }
this method is called from native code in order to write encoder output to the destination . we block any attempt to change the writer state during this method , in order to prevent a corruption of the native encoder state .
