BlockEntry Class

  • java.lang.Object
    • com.microsoft.azure.storage.blob.BlockEntry

public class BlockEntry

A class which is used to list and commit blocks of a CloudBlockBlob.

Constructor Summary

Constructor Description
BlockEntry(final String id)

Creates an instance of the class with the specified id and default search mode LATEST.

BlockEntry(final String id, final BlockSearchMode searchMode)

Creates an instance of the class with the specified id and search mode.

Method Summary

Modifier and Type Method and Description
String getId()

Gets the id of the block. The block id is a valid Base64 string value that identifies the block. Prior to encoding, the string must be less than or equal to 64 bytes in size. For a given blob, the length of the block id must be the same size for each block.

BlockSearchMode getSearchMode()

Gets the BlockSearchMode.

long getSize()

Gets the size, in bytes, of the block.

void setId(final String id)

Sets the id of the block. The block id is a valid Base64 string value that identifies the block. Prior to encoding, the string must be less than or equal to 64 bytes in size. For a given blob, the length of the block id must be the same size for each block.

void setSearchMode(BlockSearchMode searchMode)

Sets the BlockSearchMode.

void setSize(final long size)

Sets the size, in bytes, of the block.

Constructor Details

BlockEntry

public BlockEntry(final String id)

Creates an instance of the class with the specified id and default search mode LATEST.

Parameters:

id - A String which represents the ID of the block.

BlockEntry

public BlockEntry(final String id, final BlockSearchMode searchMode)

Creates an instance of the class with the specified id and search mode.

Parameters:

id - A String which represents the ID of the block.
searchMode - A BlockSearchMode value which represents the block search mode.

Method Details

getId

public String getId()

Gets the id of the block. The block id is a valid Base64 string value that identifies the block. Prior to encoding, the string must be less than or equal to 64 bytes in size. For a given blob, the length of the block id must be the same size for each block.

Returns:

A String which represents the ID of the block.

getSearchMode

public BlockSearchMode getSearchMode()

Gets the BlockSearchMode.

Returns:

A BlockSearchMode value which represents the block search mode.

getSize

public long getSize()

Gets the size, in bytes, of the block.

Returns:

A long which represents the the size, in bytes, of the block.

setId

public void setId(final String id)

Sets the id of the block. The block id is a valid Base64 string value that identifies the block. Prior to encoding, the string must be less than or equal to 64 bytes in size. For a given blob, the length of the block id must be the same size for each block.

Parameters:

id - A String which represents the ID of the block to set.

setSearchMode

public void setSearchMode(BlockSearchMode searchMode)

Sets the BlockSearchMode.

Parameters:

searchMode - A BlockSearchMode value which represents the block search mode to set.

setSize

public void setSize(final long size)

Sets the size, in bytes, of the block.

Parameters:

size - A long which represents the the size, in bytes, of the block to set.

Applies to