Interface RiffHandler

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addError​(java.lang.String message)
      Registers an error message for consumption after extraction.
      void processChunk​(java.lang.String fourCC, byte[] payload)
      Perform whatever processing is necessary for the type of chunk with its payload.
      boolean shouldAcceptChunk​(java.lang.String fourCC)
      Gets whether this handler is interested in the specific chunk type.
      boolean shouldAcceptList​(java.lang.String fourCC)
      Gets whether this handler is interested in the specific list type.
      boolean shouldAcceptRiffIdentifier​(java.lang.String identifier)
      Gets whether the specified RIFF identifier is of interest to this handler.
    • Method Detail

      • shouldAcceptRiffIdentifier

        boolean shouldAcceptRiffIdentifier​(java.lang.String identifier)
        Gets whether the specified RIFF identifier is of interest to this handler. Returning false causes processing to stop after reading only the first twelve bytes of data.
        Parameters:
        identifier - The four character code identifying the type of RIFF data
        Returns:
        true if processing should continue, otherwise false
      • shouldAcceptChunk

        boolean shouldAcceptChunk​(java.lang.String fourCC)
        Gets whether this handler is interested in the specific chunk type. Returns true if the data should be copied into an array and passed to processChunk(String, byte[]), or false to avoid the copy and skip to the next chunk in the file, if any.
        Parameters:
        fourCC - the four character code of this chunk
        Returns:
        true if processChunk(String, byte[]) should be called, otherwise false
      • shouldAcceptList

        boolean shouldAcceptList​(java.lang.String fourCC)
        Gets whether this handler is interested in the specific list type. Returns true if the chunks should continue being processed, or false to avoid any unknown chunks within the list.
        Parameters:
        fourCC - the four character code of this chunk
        Returns:
        true if processChunk(String, byte[]) should be called, otherwise false
      • processChunk

        void processChunk​(java.lang.String fourCC,
                          byte[] payload)
        Perform whatever processing is necessary for the type of chunk with its payload. This is only called if a previous call to shouldAcceptChunk(String) with the same fourCC returned true.
        Parameters:
        fourCC - the four character code of the chunk
        payload - they payload of the chunk as a byte array
      • addError

        void addError​(java.lang.String message)
        Registers an error message for consumption after extraction.
        Parameters:
        message - the error message