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:
Applies to
Azure SDK for Java