Class AlbumArt


  • public class AlbumArt
    extends Object

    Represents album artwork associated with tracks loaded into players on a DJ Link network, and provides a convenience method for getting a buffered image for drawing the art.

    Author:
    James Elliott
    • Field Detail

      • artReference

        public final DataReference artReference
        The unique artwork identifier that was used to request this album art. Even though it is not a track, the same pieces of information are used.
    • Constructor Detail

      • AlbumArt

        public AlbumArt​(DataReference artReference,
                        File file)
                 throws IOException
        Constructor used with a file downloaded via NFS by Crate Digger.
        Parameters:
        artReference - the unique database reference that was used to request this artwork
        file - the file of image data as loaded from the player
        Throws:
        IOException - if there is a problem reading the file
      • AlbumArt

        public AlbumArt​(DataReference artReference,
                        ByteBuffer rawBytes)
        Constructor usable by caching mechanism simply sets the immutable value fields.
        Parameters:
        artReference - the unique database reference that was used to request this artwork
        rawBytes - the bytes of image data as loaded from the player or media export
    • Method Detail

      • getRawBytes

        public ByteBuffer getRawBytes()
        Get the raw bytes of the artwork image as returned by the player.
        Returns:
        the bytes that make up the album art
      • getImage

        public BufferedImage getImage()
        Given the byte buffer containing album art, build an actual image from it for easy rendering.
        Returns:
        the newly-created image, ready to be drawn