2026년부터 트렁크 안정 개발 모델과 일치하고 생태계의 플랫폼 안정성을 보장하기 위해 2분기와 4분기에 AOSP에 소스 코드를 게시합니다. AOSP를 빌드하고 기여하려면 android-latest-release를 사용하세요. android-latest-release 매니페스트 브랜치는 항상 AOSP에 푸시된 최신 버전을 참조합니다. 자세한 내용은 AOSP 변경사항을 참고하세요.
Google은 AI 기술을 사용하여 콘텐츠를 사용자의 기본 언어로 번역합니다. AI 번역에는 오류가 있을 수 있습니다.
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
CollectingOutputReceiver
public
class
CollectingOutputReceiver
extends Object
implements
IShellOutputReceiver
| java.lang.Object
|
| ↳ |
com.android.ddmlib.CollectingOutputReceiver
|
전체 셸 출력을 하나의 String로 수집하는 IShellOutputReceiver
요약
공개 생성자
CollectingOutputReceiver
public CollectingOutputReceiver ()
CollectingOutputReceiver
public CollectingOutputReceiver (CountDownLatch commandCompleteLatch)
| 매개변수 |
commandCompleteLatch |
CountDownLatch |
공개 메서드
addOutput
public void addOutput (byte[] data,
int offset,
int length)
새 데이터를 사용할 수 있을 때마다 호출됩니다.
| 매개변수 |
data |
byte: 새 데이터입니다. |
offset |
int: 새 데이터가 시작되는 오프셋입니다. |
length |
int: 새 데이터의 길이입니다. |
awaitCompletion
public boolean awaitCompletion (long timeout,
TimeUnit unit)
| 매개변수 |
timeout |
long |
unit |
TimeUnit |
| 생성 값 |
InterruptedException |
|
취소
public void cancel ()
출력 컬렉션을 취소합니다.
플러시
public void flush ()
프로세스 실행이 끝날 때 호출됩니다 (프로세스가 취소되지 않은 경우). 이를 통해 수신자는 아직 처리되지 않은 데이터를 종료하고 플러시할 수 있습니다.
getOutput
public String getOutput ()
isCancelled
public boolean isCancelled ()
원격 셸 명령어의 실행을 중지하는 취소 메서드
| 반환 |
boolean |
명령어 실행을 취소하려면 true입니다. |
isComplete
public boolean isComplete ()
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2026-06-22(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2026-06-22(UTC)"],[],[]]