Documentation of 'org.apache.poi.xwpf.usermodel.XWPFPictureData' Java class
XWPFPictureData
org.apache.poi.xwpf.usermodel

Class XWPFPictureData

    • Constructor Detail

      • XWPFPictureData

        public XWPFPictureData(PackagePart part,
                               PackageRelationship rel)
        Construct XWPFPictureData from a package part
        Parameters:
        part - the package part holding the drawing data,
        rel - the package relationship holding this drawing, the relationship type must be http://schemas.openxmlformats.org/officeDocument/2006/relationships/image
    • Method Detail

      • getData

        public byte[] getData()
        Gets the picture data as a byte array.

        Note, that this call might be expensive since all the picture data is copied into a temporary byte array. You can grab the picture data directly from the underlying package part as follows:
        InputStream is = getPackagePart().getInputStream();

        Returns:
        the Picture data.
      • getFileName

        public java.lang.String getFileName()
        Returns the file name of the image, eg image7.jpg . The original filename isn't always available, but if it can be found it's likely to be in the CTDrawing
      • suggestFileExtension

        public java.lang.String suggestFileExtension()
        Suggests a file extension for this image.
        Returns:
        the file extension.
      • getChecksum

        public java.lang.Long getChecksum()
      • equals

        public boolean equals(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.