HeapSegment

public final class HeapSegment
extends Object

java.lang.Object
   ↳ com.android.tradefed.device.server.HeapSegment


ヒープのセグメント内のオブジェクトの型と場所を記述します。

概要

ネストされたクラス

class HeapSegment.HeapSegmentElement

HPSG データでエンコードされたオブジェクト/リージョンを記述します。 

フィールド

protected int mAllocationUnitCount

protected int mAllocationUnitSize

protected int mHeapId

protected int mOffset

protected long mStartAddress

protected ByteBuffer mUsageData

パブリック コンストラクタ

HeapSegment(ByteBuffer hpsgData)

HPSG チャンクの未加工のコンテンツに基づいて新しい HeapSegment を作成します。

パブリック メソッド

boolean append(HeapSegment other)

other の内容がこのセグメントの直後のセグメントを説明している場合は、このセグメントに追加します。

boolean canAppend(HeapSegment other)

other がこのセグメントの直後にあるかどうかを確認します。

int compareTo(HeapSegment other)
boolean equals(Object o)
long getEndAddress()
int getLength()
HeapSegment.HeapSegmentElement getNextElement(HeapSegment.HeapSegmentElement reuse)
long getStartAddress()
int hashCode()
boolean isValid()

このセグメントにまだデータが含まれており、別のセグメントに追加されていないかどうかを確認します。

void rewindElements()
String toString()

フィールド

mAllocationUnitCount

protected int mAllocationUnitCount

mAllocationUnitSize

protected int mAllocationUnitSize

mHeapId

protected int mHeapId

mOffset

protected int mOffset

mStartAddress

protected long mStartAddress

mUsageData

protected ByteBuffer mUsageData

パブリック コンストラクタ

HeapSegment

public HeapSegment (ByteBuffer hpsgData)

HPSG チャンクの未加工のコンテンツに基づいて新しい HeapSegment を作成します。

パラメータ
hpsgData ByteBuffer: HPSG チャンクからの未加工データ。

例外
hpsgData が HPSG チャンク ヘッダー データを保持するには小さすぎる場合。

パブリック メソッド

追加

public boolean append (HeapSegment other)

other の内容がこのセグメントの直後のセグメントを説明している場合は、このセグメントにその内容を追加します。

パラメータ
other HeapSegment: このセグメントに追加するセグメント(可能な場合)。追加された場合、このメソッドが返されると other は無効になります。

戻り値
boolean other がこのセグメントに正常に追加された場合は true。

canAppend

public boolean canAppend (HeapSegment other)

other がこのセグメントの直後にあるかどうかを確認します。

パラメータ
other HeapSegment: チェックする HeapSegment。

戻り値
boolean other がこのセグメントの直後に続く場合は true。

compareTo

public int compareTo (HeapSegment other)

パラメータ
other HeapSegment

戻り値
int

equals

public boolean equals (Object o)

パラメータ
o Object

戻り値
boolean

getEndAddress

public long getEndAddress ()

戻り値
long

getLength

public int getLength ()

戻り値
int

getNextElement

public HeapSegment.HeapSegmentElement getNextElement (HeapSegment.HeapSegmentElement reuse)

パラメータ
reuse HeapSegment.HeapSegmentElement

戻り値
HeapSegment.HeapSegmentElement

getStartAddress

public long getStartAddress ()

戻り値
long

hashCode

public int hashCode ()

戻り値
int

isValid

public boolean isValid ()

このセグメントにまだデータが含まれており、別のセグメントに追加されていないかどうかを確認します。

戻り値
boolean このセグメントが別のセグメントに追加されていない場合は true。

rewindElements

public void rewindElements ()

toString

public String toString ()

戻り値
String