code: public static int writeString(final BitOutput bitOutput, final int lengthSize, final String value,
                                    final String charsetName)
              throws IOException {
          return writeBytes(bitOutput, lengthSize, Byte.SIZE, value.getBytes(charsetName));
      }
docs: -----------------------------------------------------------------------------------------------------------------