ContentStream class
디코딩할 콘텐츠를 포함하는 고정 또는 무한 길이의 스트림입니다.
생성자
| Content |
ContentStream 클래스의 새 인스턴스를 초기화합니다. |
속성
| content |
이 ContentStream포함된 개체 형식의 이름을 가져옵니다. |
| id | |
| length | 이 ContentStream길이를 가져옵니다. |
메서드
| cancel() | 어셈블러를 닫습니다. |
| get |
이 ContentStream포함된 데이터를 가져옵니다. |
| read |
SubscribableStream 콘텐츠를 형식화된 JSON 개체로 가져옵니다. |
| read |
SubscribableStream 콘텐츠를 문자열로 가져옵니다. |
생성자 세부 정보
ContentStream(string, PayloadAssembler)
ContentStream 클래스의 새 인스턴스를 초기화합니다.
new ContentStream(id: string, assembler: PayloadAssembler)
매개 변수
- id
-
string
이 인스턴스에 할당된 ID입니다.
- assembler
- PayloadAssembler
이 인스턴스에 할당된 PayloadAssembler.
속성 세부 정보
contentType
id
id: string
속성 값
string
length
메서드 세부 정보
cancel()
어셈블러를 닫습니다.
function cancel()
getStream()
readAsJson<T>()
SubscribableStream 콘텐츠를 형식화된 JSON 개체로 가져옵니다.
function readAsJson<T>(): Promise<T>
반환
Promise<T>
SubscribableStream 콘텐츠가 있는 형식화된 개체 Promise입니다.
readAsString()
SubscribableStream 콘텐츠를 문자열로 가져옵니다.
function readAsString(): Promise<string>
반환
Promise<string>
SubscribableStream 콘텐츠가 포함된 문자열 Promise입니다.