クラス CharBufferDecoder

実装されたすべてのインターフェース:
Decoder<CharBufferSE>

public final class CharBufferDecoder extends AbstractCharSequenceDecoder<CharBufferSE>
データバッファーストリームから CharBuffer ストリームにデコードし、受信データチャンクを分割または集約して改行セパレーターに沿って再調整し、文字バッファーのストリームを生成します。これはストリーミングに便利ですが、マルチバイト文字を正しくデコードして文字分割の課題を回避するためにも必要です。デフォルトで使用されるデフォルトの区切り文字は \n および \r\n ですが、カスタマイズできます。
導入:
6.1
作成者:
Markus Heiden, Arjen Poutsma
関連事項:
  • コンストラクターの詳細

    • CharBufferDecoder

      public CharBufferDecoder(ListSE<StringSE> delimiters, boolean stripDelimiter, MimeType... mimeTypes)
  • メソッドの詳細

    • canDecode

      public boolean canDecode(ResolvableType elementType, @Nullable MimeType mimeType)
      インターフェースからコピーされた説明: Decoder
      デコーダーが特定のターゲット要素型とソースストリームの MIME 型をサポートするかどうか。
      次で指定:
      インターフェース Decoder<CharBufferSE>canDecode 
      オーバーライド:
      クラス AbstractDecoder<CharBufferSE>canDecode 
      パラメーター:
      elementType - 出力ストリームのターゲット要素型
      mimeType - デコードするストリームに関連付けられた MIME 型 (指定しない場合は null にすることができます)
      戻り値:
      サポートされている場合は true、サポートされていない場合は false 
    • decodeInternal

      protected CharBufferSE decodeInternal(DataBuffer dataBuffer, CharsetSE charset)
      クラスからコピーされた説明: AbstractCharSequenceDecoder
      指定された文字セットを使用して、指定されたデータバッファーを T にデコードするテンプレートメソッド。
      次で指定:
      クラス AbstractCharSequenceDecoder<CharBufferSE>decodeInternal 
    • textPlainOnly

      public static CharBufferDecoder textPlainOnly()
      "text/plain" の CharBufferDecoder を作成します。
    • textPlainOnly

      public static CharBufferDecoder textPlainOnly(ListSE<StringSE> delimiters, boolean stripDelimiter)
      "text/plain" の CharBufferDecoder を作成します。
      パラメーター:
      delimiters - 入力ストリームを分割するために使用する区切り文字列
      stripDelimiter - 結果の入力文字列から区切り文字を削除するかどうか
    • allMimeTypes

      public static CharBufferDecoder allMimeTypes()
      すべての MIME 型をサポートする CharBufferDecoder を作成します。
    • allMimeTypes

      public static CharBufferDecoder allMimeTypes(ListSE<StringSE> delimiters, boolean stripDelimiter)
      すべての MIME 型をサポートする CharBufferDecoder を作成します。
      パラメーター:
      delimiters - 入力ストリームを分割するために使用する区切り文字列
      stripDelimiter - 結果の入力文字列から区切り文字を削除するかどうか