Class ShrinkWrapResource

java.lang.Object
cloud.piranha.resource.shrinkwrap.ShrinkWrapResource
All Implemented Interfaces:
Resource

public class ShrinkWrapResource
extends java.lang.Object
implements Resource
Author:
Arjan Tijms
  • Constructor Summary

    Constructors 
    Constructor Description
    ShrinkWrapResource​(java.lang.String resourcesPath, org.jboss.shrinkwrap.api.Archive<?> archive)  
    ShrinkWrapResource​(org.jboss.shrinkwrap.api.Archive<?> archive)  
  • Method Summary

    Modifier and Type Method Description
    java.util.stream.Stream<java.lang.String> getAllLocations()
    Get all the locations for this resource.
    java.util.stream.Stream<java.lang.String> getAllLocations​(org.jboss.shrinkwrap.api.Archive<?> archiveToGetFrom)  
    java.net.URL getResource​(java.lang.String url)
    Get the resource.
    java.io.InputStream getResourceAsStream​(java.lang.String url)
    Get the resource as a stream.
    java.io.InputStream getResourceAsStreamByLocation​(java.lang.String location)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ShrinkWrapResource

      public ShrinkWrapResource​(java.lang.String resourcesPath, org.jboss.shrinkwrap.api.Archive<?> archive)
    • ShrinkWrapResource

      public ShrinkWrapResource​(org.jboss.shrinkwrap.api.Archive<?> archive)
  • Method Details

    • getResource

      public java.net.URL getResource​(java.lang.String url)
      Description copied from interface: Resource
      Get the resource.
      Specified by:
      getResource in interface Resource
      Parameters:
      url - the location.
      Returns:
      the URL.
    • getResourceAsStream

      public java.io.InputStream getResourceAsStream​(java.lang.String url)
      Description copied from interface: Resource
      Get the resource as a stream.
      Specified by:
      getResourceAsStream in interface Resource
      Parameters:
      url - the location.
      Returns:
      the resource as a stream, or null if not found.
    • getResourceAsStreamByLocation

      public java.io.InputStream getResourceAsStreamByLocation​(java.lang.String location)
    • getAllLocations

      public java.util.stream.Stream<java.lang.String> getAllLocations()
      Description copied from interface: Resource
      Get all the locations for this resource.
      Specified by:
      getAllLocations in interface Resource
      Returns:
      all the locations for this resource.
    • getAllLocations

      public java.util.stream.Stream<java.lang.String> getAllLocations​(org.jboss.shrinkwrap.api.Archive<?> archiveToGetFrom)