cdm/src/main/java/ucar/unidata/io/RandomAccessFile.java
public final void writeChars(String s) throws IOException {
    int len = s.length();
    for (int i = 0; i < len; i++) {
      int v = s.charAt(i);
      write((v >>> 8) & 0xFF);
      write((v) & 0xFF);
    }
  }
public final void writeChars(String s) throws IOException {
    int len = s.length();
    for (int i = 0; i < len; i++) {
      int v = s.charAt(i);
      write((v >>> 8) & 0xFF);
      write((v) & 0xFF);
    }
  }
Writes a string to the file as a sequence of characters. Each
character is written to the data output stream as if by the
<code>writeChar</code> method.

@param s a <code>String</code> value to be written.
@throws IOException if an I/O error occurs.
@see java.io.RandomAccessFile#writeChar(int)