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

같음

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