你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Block Class
- java.
lang. Object - com.
azure. storage. blob. models. Block
- com.
Implements
public final class Block
implements XmlSerializable<Block>
Represents a single block in a block blob. It describes the block's ID and size.
Constructor Summary
Constructor | Description |
---|---|
Block() |
Creates an instance of Block class. |
Method Summary
Modifier and Type | Method and Description |
---|---|
static Block |
fromXml(XmlReader xmlReader)
Reads an instance of Block from the Xml |
static Block |
fromXml(XmlReader xmlReader, String rootElementName)
Reads an instance of Block from the Xml |
String |
getName()
Get the name property: The base64 encoded block ID. |
int |
getSize()
Deprecated
Use getSizeLong()
Get the size |
long |
getSizeLong()
Get the size |
Block |
setName(String name)
Set the name property: The base64 encoded block ID. |
Block |
setSize(int sizeInt)
Deprecated Set the size |
Block |
setSizeLong(long sizeLong)
Set the size |
Xml |
toXml(XmlWriter xmlWriter) |
Xml |
toXml(XmlWriter xmlWriter, String rootElementName) |
Methods inherited from java.lang.Object
Constructor Details
Block
public Block()
Creates an instance of Block class.
Method Details
fromXml
public static Block fromXml(XmlReader xmlReader)
Reads an instance of Block from the XmlReader.
Parameters:
Returns:
Throws:
fromXml
public static Block fromXml(XmlReader xmlReader, String rootElementName)
Reads an instance of Block from the XmlReader.
Parameters:
Returns:
Throws:
getName
public String getName()
Get the name property: The base64 encoded block ID.
Returns:
getSize
@Deprecated
public int getSize()
Deprecated
Get the sizeInt property: The SizeInt property.
Returns:
getSizeLong
public long getSizeLong()
Get the sizeLong property: The block size in bytes.
Returns:
setName
public Block setName(String name)
Set the name property: The base64 encoded block ID.
Parameters:
Returns:
setSize
@Deprecated
public Block setSize(int sizeInt)
Deprecated
Set the sizeInt property: The SizeInt property.
Parameters:
Returns:
setSizeLong
public Block setSizeLong(long sizeLong)
Set the sizeLong property: The block size in bytes.
Parameters:
Returns:
toXml
toXml
public XmlWriter toXml(XmlWriter xmlWriter, String rootElementName)
Parameters:
Throws: