@DOMNoInterfaceObjectAttribute public interface IBlob
A Blob object refers to a byte sequence, and has a size attribute which is the total number of bytes in the byte sequence, and a type attribute, which is an ASCII-encoded string in lower case representing the media type of the byte sequence.
Modifier and Type | Method and Description |
---|---|
long |
getSize()
Returns the size of the byte sequence in number of bytes.
|
java.lang.String |
getType()
The ASCII-encoded string in lower case representing the media type of the Blob.
|
IBlob |
slice(long start,
long end,
java.lang.String contentType)
Returns a new Blob object with bytes ranging from the optional start parameter up to but not including the optional end parameter,
and with a type attribute that is the value of the optional contentType parameter.
|
@DOMNameAttribute(name="size") long getSize()
Returns the size of the byte sequence in number of bytes. On getting, conforming user agents must return the total number of bytes that can be read by a FileReader or FileReaderSync object, or 0 if the Blob has no bytes to be read.
@DOMNameAttribute(name="type") java.lang.String getType()
The ASCII-encoded string in lower case representing the media type of the Blob. On getting, user agents must return the type of a Blob as an ASCII-encoded string in lower case, such that when it is converted to a byte sequence, it is a parsable MIME type, or the empty string – 0 bytes – if the type cannot be determined.
@DOMNameAttribute(name="slice") IBlob slice(long start, long end, java.lang.String contentType)
Returns a new Blob object with bytes ranging from the optional start parameter up to but not including the optional end parameter, and with a type attribute that is the value of the optional contentType parameter.
start
- The parameter is a value for the start point of a sliceend
- The parameter is a value for the start point of a slicecontentType
- The parameter is a media type of the Blob