Class BasicObject

    • Constructor Detail

      • BasicObject

        public BasicObject()
    • Method Detail

      • parse

        public static <T extends BasicObject> T parse​(byte[] byteArray,
                                                      AtomicInteger index,
                                                      Class<T> clazz)
                                               throws org.apache.tika.exception.TikaException,
                                                      IOException
        Used to parse byte array to special object.
        Parameters:
        byteArray - The byte array contains raw data.
        index - The index special where to start.
        Returns:
        The instance of target object.
        Throws:
        org.apache.tika.exception.TikaException
        IOException
      • deserializeFromByteArray

        public int deserializeFromByteArray​(byte[] byteArray,
                                            int startIndex)
                                     throws org.apache.tika.exception.TikaException,
                                            IOException
        Used to return the length of this element.
        Parameters:
        byteArray - The byte list.
        startIndex - The start position.
        Returns:
        The element length.
        Throws:
        org.apache.tika.exception.TikaException
        IOException
      • doDeserializeFromByteArray

        protected abstract int doDeserializeFromByteArray​(byte[] byteArray,
                                                          int startIndex)
                                                   throws IOException,
                                                          org.apache.tika.exception.TikaException
        Used to return the length of this element.
        Parameters:
        byteArray - The byte list.
        startIndex - The start position.
        Returns:
        The element length
        Throws:
        IOException
        org.apache.tika.exception.TikaException