code: public static byte[] toByteArray(char c, ByteOrder bo) {
      return ByteBuffer.allocate(2).order(bo).putChar(c).array();
    }
docs: Converts a char into a byte array.
  
  @param c
  a char
  @param bo
  a ByteOrder
  @return byte array