Class StandardAudioArtwork

    • Constructor Detail

      • StandardAudioArtwork

        public StandardAudioArtwork​(AudioArtwork audioArtwork,
                                    AudioArtwork.Kind kind)
        Creates a copy of the given artwork while allowing to change the kind.
        Parameters:
        audioArtwork - artwork
        kind - new kind
      • StandardAudioArtwork

        public StandardAudioArtwork​(Image image,
                                    AudioArtwork.Kind kind)
        Create an AudioArtwork from the given image.
        Parameters:
        image - image
        kind - kind of artwork
      • StandardAudioArtwork

        public StandardAudioArtwork​(File imageFile,
                                    AudioArtwork.Kind kind)
                             throws IOException
        Create an AudioArtwork from the given file.
        Parameters:
        imageFile - image file
        kind - kind of artwork
        Throws:
        IOException - if the image file cannot be parsed or does not exist
    • Method Detail

      • getUserAgent

        public static String getUserAgent()
      • setUserAgent

        public static void setUserAgent​(String userAgent)
      • createLazily

        public static AudioArtwork createLazily​(URL imageURL,
                                                AudioArtwork.Kind kind)
        Creates an AudioArtwork object without actually loading the image. The image itself is only loaded, once it is accessed.
        Parameters:
        imageURL - imageURL
        kind - kind of artwork the URL contains
        Returns:
        lazy artwork
      • getImageData

        public byte[] getImageData()
        Description copied from interface: AudioArtwork
        Encoded image data. Image data that looks exactly like the data usually stored in a file. This means, for a PNG image, this method will return the PNG encoded data.
        Specified by:
        getImageData in interface AudioArtwork
        Returns:
        encoded image data
      • getMimeType

        public String getMimeType()
        Description copied from interface: AudioArtwork
        Mime type. Usually something like image/jpeg.
        Specified by:
        getMimeType in interface AudioArtwork
        Returns:
        mime type, if known. Otherwise null
      • getURI

        public URI getURI()
        Description copied from interface: AudioArtwork
        URI of this artwork. May be null, if not available.
        Specified by:
        getURI in interface AudioArtwork
        Returns:
        uri or null
      • isKindSupportedByAudioFileFormat

        public static boolean isKindSupportedByAudioFileFormat​(AudioFileFormat fileFormat)
        Indicates, whether different AudioArtwork.Kinds of artwork are supported by a AudioFileFormat.
        Parameters:
        fileFormat - file format
        Returns:
        true, if different kinds are supported
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object