public void write(byte[] bytes) throws IOException {
  flushBits();
  if (bytes != null && bytes.length > 0) {
    out.write(bytes);
    bytesWritten+=bytes.length;
  }
}

public void write ( byte [ ] bytes ) throws IOException { flushBits ( ) ; if ( bytes != null && bytes . length > 0 ) { out . write ( bytes ) ; bytesWritten += bytes . length ; } }
write the given bytes to the output stream
