パッケージ org.springframework.asm

クラス ByteVector

java.lang.ObjectSE
org.springframework.asm.ByteVector

public class ByteVector extends ObjectSE
動的に拡張可能なバイトのベクトル。このクラスは、ByteArrayOutputStream 上の DataOutputStream とほぼ同じですが、より効率的です。
作成者:
Eric Bruneton
  • コンストラクターのサマリー

    コンストラクター
    コンストラクター
    説明
    デフォルトの初期容量で新しい ByteVector を構築します。
    ByteVector(int initialCapacity)
    指定された初期容量で新しい ByteVector を構築します。
  • メソッドのサマリー

    修飾子と型
    メソッド
    説明
    putByte(int byteValue)
    バイトをこのバイトベクトルに入れます。
    putByteArray(byte[] byteArrayValue, int byteOffset, int byteLength)
    バイトの配列をこのバイトベクトルに入れます。
    putInt(int intValue)
    int をこのバイトベクトルに入れます。
    putLong(long longValue)
    long をこのバイトベクトルに入れます。
    putShort(int shortValue)
    short をこのバイトベクトルに入れます。
    putUTF8(StringSE stringValue)
    UTF8 文字列をこのバイトベクトルに入れます。
    int
    このベクトルの実際のバイト数を返します。

    クラス java.lang.ObjectSE から継承されたメソッド

    clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, toString, wait, waitSE, waitSE
  • コンストラクターの詳細

    • ByteVector

      public ByteVector()
      デフォルトの初期容量で新しい ByteVector を構築します。
    • ByteVector

      public ByteVector(int initialCapacity)
      指定された初期容量で新しい ByteVector を構築します。
      パラメーター:
      initialCapacity - 構築されるバイトベクトルの初期容量。
  • メソッドの詳細

    • size

      public int size()
      このベクトルの実際のバイト数を返します。
      戻り値:
      このベクトルの実際のバイト数。
    • putByte

      public ByteVector putByte(int byteValue)
      バイトをこのバイトベクトルに入れます。バイトベクトルは、必要に応じて自動的に拡大されます。
      パラメーター:
      byteValue - バイト。
      戻り値:
      このバイトベクトル。
    • putShort

      public ByteVector putShort(int shortValue)
      short をこのバイトベクトルに入れます。バイトベクトルは、必要に応じて自動的に拡大されます。
      パラメーター:
      shortValue - ショート。
      戻り値:
      このバイトベクトル。
    • putInt

      public ByteVector putInt(int intValue)
      int をこのバイトベクトルに入れます。バイトベクトルは、必要に応じて自動的に拡大されます。
      パラメーター:
      intValue - int。
      戻り値:
      このバイトベクトル。
    • putLong

      public ByteVector putLong(long longValue)
      long をこのバイトベクトルに入れます。バイトベクトルは、必要に応じて自動的に拡大されます。
      パラメーター:
      longValue - 長い。
      戻り値:
      このバイトベクトル。
    • putUTF8

      public ByteVector putUTF8(StringSE stringValue)
      UTF8 文字列をこのバイトベクトルに入れます。バイトベクトルは、必要に応じて自動的に拡大されます。
      パラメーター:
      stringValue - UTF8 エンコードされた長さが 65536 未満である必要がある文字列。
      戻り値:
      このバイトベクトル。
    • putByteArray

      public ByteVector putByteArray(byte[] byteArrayValue, int byteOffset, int byteLength)
      バイトの配列をこのバイトベクトルに入れます。バイトベクトルは、必要に応じて自動的に拡大されます。
      パラメーター:
      byteArrayValue - バイトの配列。このバイトベクトルに byteLength null バイトを入れるために null の場合があります。
      byteOffset - コピーする必要がある byteArrayValue の最初のバイトのインデックス。
      byteLength - コピーする必要のある byteArrayValue のバイト数。
      戻り値:
      このバイトベクトル。