Class ByteArrayResource

  • All Implemented Interfaces:
    Resource

    public class ByteArrayResource
    extends Object
    implements Resource
    The byte-array resource.
    Author:
    Manfred Riem (mriem@manorrock.com)
    • Constructor Detail

      • ByteArrayResource

        public ByteArrayResource​(String location,
                                 byte[] bytes)
        Constructor.
        Parameters:
        location - the location.
        bytes - the byte-array.
    • Method Detail

      • getBytes

        public byte[] getBytes()
        Get the byte-array.
        Returns:
        the byte-array.
      • getResource

        public URL getResource​(String location)
        Get the resource.
        Specified by:
        getResource in interface Resource
        Parameters:
        location - the location.
        Returns:
        the URL, or null if not found.
      • getResourceAsStream

        public InputStream getResourceAsStream​(String location)
        Get the resource as a stream.
        Specified by:
        getResourceAsStream in interface Resource
        Parameters:
        location - the location.
        Returns:
        the input stream.