HeapSegment

public final class HeapSegment
extends Object implements Comparable<HeapSegment>

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 チャンクからの未加工データ。

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

パブリック メソッド

append

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

等しい

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