GZipStream.BeginWrite(Byte[], Int32, Int32, AsyncCallback, Object) 메서드

정의

비동기 쓰기 작업을 시작합니다. (대신 WriteAsync(Byte[], Int32, Int32) 메서드를 사용하는 것이 좋습니다.)

public:
 override IAsyncResult ^ BeginWrite(cli::array <System::Byte> ^ array, int offset, int count, AsyncCallback ^ asyncCallback, System::Object ^ asyncState);
public:
 override IAsyncResult ^ BeginWrite(cli::array <System::Byte> ^ buffer, int offset, int count, AsyncCallback ^ asyncCallback, System::Object ^ asyncState);
public override IAsyncResult BeginWrite (byte[] array, int offset, int count, AsyncCallback? asyncCallback, object? asyncState);
public override IAsyncResult BeginWrite (byte[] buffer, int offset, int count, AsyncCallback? asyncCallback, object? asyncState);
public override IAsyncResult BeginWrite (byte[] array, int offset, int count, AsyncCallback asyncCallback, object asyncState);
override this.BeginWrite : byte[] * int * int * AsyncCallback * obj -> IAsyncResult
override this.BeginWrite : byte[] * int * int * AsyncCallback * obj -> IAsyncResult
Public Overrides Function BeginWrite (array As Byte(), offset As Integer, count As Integer, asyncCallback As AsyncCallback, asyncState As Object) As IAsyncResult
Public Overrides Function BeginWrite (buffer As Byte(), offset As Integer, count As Integer, asyncCallback As AsyncCallback, asyncState As Object) As IAsyncResult

매개 변수

arraybuffer
Byte[]

현재 스트림에 쓸 데이터를 포함하는 버퍼입니다.

offset
Int32

쓰기를 시작할 바이트 오프셋입니다.

count
Int32

쓸 최대 바이트 수입니다.

asyncCallback
AsyncCallback

쓰기 작업이 완료되면 호출되는 선택적 비동기 콜백입니다.

asyncState
Object

다른 요청에서 특정 비동기 쓰기 요청을 구별하는 사용자 제공 개체입니다.

반환

보류 중인 비동기 쓰기 작업을 나타내는 개체입니다.

예외

내부 스트림이 null인 경우

또는

내부 스트림이 닫혀 있는 경우

설명

.NET Framework 4.5부터 메서드를 사용하여 Stream.WriteAsync 비동기 쓰기 작업을 수행할 수 있습니다. 메서드는 BeginWrite 레거시 코드를 지원하기 위해 현재 버전에서 계속 사용할 수 있지만 새 비동기 메서드를 사용하여 비동기 I/O 작업을 보다 쉽게 구현할 수 있습니다. 자세한 내용은 비동기 파일 I/O를 참조하세요.

메서드는 BeginWrite 스트림 개체에 대한 비동기 쓰기 작업을 GZipStream 시작합니다.

대리자를 구현하는 콜백 메서드를 AsyncCallback 만들고 해당 이름을 메서드에 BeginWrite 전달해야 합니다.

적용 대상