java.lang.Object
one.jpro.platform.image.manager.source.ImageSourceURL
All Implemented Interfaces:
JsonConvertible, ImageSource

public class ImageSourceURL extends Object implements ImageSource
This class provides an implementation of the ImageSource interface for an image source fetched from a given URL.
See Also:
  • Constructor Details

    • ImageSourceURL

      public ImageSourceURL(URL url)
  • Method Details

    • loadImage

      public BufferedImage loadImage()
      Description copied from interface: ImageSource
      Loads an image and returns it as BufferedImage.
      Specified by:
      loadImage in interface ImageSource
      Returns:
      The loaded image as a BufferedImage object.
    • identityHashValue

      public long identityHashValue()
      Description copied from interface: ImageSource
      Returns the identity hash code associated with this image source.
      Specified by:
      identityHashValue in interface ImageSource
      Returns:
      The identity hash value corresponding to this object.
    • toJSON

      public org.json.JSONObject toJSON()
      Description copied from interface: JsonConvertible
      Converts the object to a JSON representation.
      Specified by:
      toJSON in interface JsonConvertible
      Returns:
      A JSONObject representing the object.
    • getFileName

      public String getFileName()
      Description copied from interface: ImageSource
      Returns the file name associated with this image source.
      Specified by:
      getFileName in interface ImageSource
      Returns:
      The file name as a string.