Class XWPFPictureData

  • public class XWPFPictureData
    extends POIXMLDocumentPart
    Raw picture data, normally attached to a WordprocessingML Drawing. As a rule, pictures are stored in the /word/media/ part of a WordprocessingML package.
    • Constructor Detail

      • XWPFPictureData

        public XWPFPictureData​(PackagePart part)
        Construct XWPFPictureData from a package part
        part - the package part holding the drawing data,
        POI 3.14-Beta1
    • 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();

        the Picture data.
      • getFileName

        public 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 String suggestFileExtension()
        Suggests a file extension for this image.
        the file extension.
      • getChecksum

        public Long getChecksum()
      • hashCode

        public int hashCode()
        hashCode in class Object