Class DataElement

    • Constructor Detail

      • DataElement

        public DataElement​(DataElementType type,
                           DataElementData data)
        Initializes a new instance of the DataElement class.
        Parameters:
        type - data element type *
        data - Specifies the data of the element .
      • DataElement

        public DataElement()
        Initializes a new instance of the DataElement class.
    • Method Detail

      • getData

        public <T extends DataElementData> T getData​(Class<T> clazz)
                                              throws org.apache.tika.exception.TikaException
        Used to get data.
        Returns:
        Data of the element
        Throws:
        org.apache.tika.exception.TikaException
      • deserializeItemsFromByteArray

        protected void deserializeItemsFromByteArray​(byte[] byteArray,
                                                     AtomicInteger currentIndex,
                                                     int lengthOfItems)
                                              throws org.apache.tika.exception.TikaException
        Used to de-serialize the element.
        Specified by:
        deserializeItemsFromByteArray in class StreamObject
        Parameters:
        byteArray - A Byte array
        currentIndex - Start position
        lengthOfItems - The length of the items
        Throws:
        org.apache.tika.exception.TikaException
      • serializeItemsToByteList

        protected int serializeItemsToByteList​(List<Byte> byteList)
                                        throws IOException,
                                               org.apache.tika.exception.TikaException
        Used to convert the element into a byte List.
        Specified by:
        serializeItemsToByteList in class StreamObject
        Parameters:
        byteList - A Byte list
        Returns:
        The element length
        Throws:
        IOException
        org.apache.tika.exception.TikaException