내보내기(0) 인쇄
모두 확장

CloudBlockBlob.PutBlock 메서드 (String, Stream, String)

Uploads a single block.

네임스페이스: Microsoft.WindowsAzure.StorageClient
어셈블리: Microsoft.WindowsAzure.StorageClient(microsoft.windowsazure.storageclient.dll)

‘사용 방법
Dim instance As CloudBlockBlob
Dim blockId As String
Dim blockData As Stream
Dim contentMD5 As String

instance.PutBlock(blockId, blockData, contentMD5)

public void PutBlock (
	string blockId,
	Stream blockData,
	string contentMD5
)
public void PutBlock (
	String blockId, 
	Stream blockData, 
	String contentMD5
)
public function PutBlock (
	blockId : String, 
	blockData : Stream, 
	contentMD5 : String
)

매개 변수

blockId

A base64-encoded block ID that identifies the block.

blockData

A stream that provides the data for the block.

contentMD5

A hash value used to verify the integrity of the block. May be null or an empty string.

The PutBlock method uploads a block for future inclusion in a block blob. A block may be up to 4 MB in size.

After you have uploaded a set of blocks, you can create or update the blob on the server from this set by calling the PutBlockList method. Each block in the set is identified by a block ID that is unique within that blob. Block IDs are scoped to a particular blob, so different blobs can have blocks with same IDs.

If you call PutBlock on a blob that does not yet exist, a new block blob is created with a content length of 0. This blob is enumerated by a blob listing operation if the UncommittedBlobs option is specified. The block or blocks that you uploaded are not committed until you commit the block list for the new blob. A blob created this way is maintained on the server for a week; if you have not added more blocks or committed blocks to the blob within that time period, then the blob is garbage collected.

The maximum block blob size currently supported is 200 GB, and up to 50,000 blocks. A blob can have a maximum of 100,000 uncommitted blocks at any given time, and the set of uncommitted blocks cannot exceed 400 GB in total size.

A block that has been successfully uploaded does not become part of a blob until it is committed with a call to PutBlockList. Before the block list is committed to create a new blob or update an existing blob, an operation to return the blob's contents does not include the contents of the uncommitted block.

If you upload a block that has the same block ID as another block that has not yet been committed, the last uploaded block with that ID will be committed on the next successful call to PutBlockList.

On calling PutBlockList, all uncommitted blocks specified in the block list are committed as part of the new blob. Any uncommitted blocks that were not specified in the block list for the blob will be garbage collected and removed from the Blob service. Any uncommitted blocks will also be garbage collected if they are not committed within a week following the last successful block upload. If another write operation is performed on the blob, any uncommitted blocks will also be garbage collected.

For a given blob, all block IDs must be the same length, but the block contents can be of different size. If a block is uploaded with a block ID of a different length than the block IDs for any existing uncommitted blocks, an exception is thrown, with an error code of InvalidBlockId.

Calling PutBlock does not update the last modified time of an existing blob.


이 형식의 모든 public static(Shared, Visual Basic의 경우) 멤버는 스레드로부터 안전합니다. 인터페이스 멤버는 스레드로부터 안전하지 않습니다.

개발 플랫폼

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Server 2008 및 Windows 2000

대상 플랫폼

커뮤니티 추가 항목

Microsoft는 MSDN 웹 사이트에 대한 귀하의 의견을 이해하기 위해 온라인 설문 조사를 진행하고 있습니다. 참여하도록 선택하시면 MSDN 웹 사이트에서 나가실 때 온라인 설문 조사가 표시됩니다.

참여하시겠습니까?
표시:
© 2014 Microsoft