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)
如果 |
boolean
|
canAppend(HeapSegment 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 的內容附加到這個區隔。
| 參數 | |
|---|---|
other |
HeapSegment:要附加到這個區段的區段 (如有可能)。如果附加,這個方法傳回時 other
會無效。 |
| 傳回 | |
|---|---|
boolean |
如果 other 已成功附加至這個區隔,則為 true。 |
canAppend
public boolean canAppend (HeapSegment other)
查看 other 是否緊接在這個區段之後。
| 參數 | |
|---|---|
other |
HeapSegment:要檢查的 HeapSegment。 |
| 傳回 | |
|---|---|
boolean |
如果 other 緊接在這個區段之後,則為 true。 |
等於
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 |
|