com.aspose.html.io

Interface IBlob

  • All Known Subinterfaces:
    IFile


    @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.

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      long getSize()
      Returns the size of the byte sequence in number of bytes.
      String getType()
      The ASCII-encoded string in lower case representing the media type of the Blob.
      IBlob slice(long start, long end, 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.
    • Method Detail

      • getSize

        @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.

      • getType

        @DOMNameAttribute(name="type")
        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.

      • slice

        @DOMNameAttribute(name="slice")
        IBlob slice(long start,
                                                     long end,
                                                     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.

        Parameters:
        start - The parameter is a value for the start point of a slice
        end - The parameter is a value for the start point of a slice
        contentType - The parameter is a media type of the Blob
        Returns:
        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.