タグ

JAVAと文字コードに関するryouzoのブックマーク (2)

  • 4.文字セット (3)

    4.3. CharsetEncoderクラス CharsetEncoderクラスはUnicode文字列を各種文字セットの文字列に変換するためのクラスです。CharsetEncoderインスタンスは、対応するCharsetインスタンスのnewEncoder()メソッドを呼び出すことによって取得できます。 文字列のエンコードを行うためのメソッドは、以下の2つ存在します。 CoderResult encode(CharBuffer in, ByteBuffer out, boolean endOfInput) ByteBuffer encode(CharBuffer in) まず、1番目の3つの引数を持った encode メソッドを使用した場合のエンコード手順を説明します。 resetメソッドを呼び出し、エンコーダをリセットする。 入力がなくなるまで繰り返しencodeメソッドを呼び出す。enc

  • IBM Developer

    IBM Developer is your one-stop location for getting hands-on training and learning in-demand skills on relevant technologies such as generative AI, data science, AI, and open source.

    IBM Developer
  • 1