Class StreamUtils


  • public class StreamUtils
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String CLASSPATH_PREFIX  
      static java.lang.String ZIP_PREFIX  
    • Constructor Summary

      Constructors 
      Constructor Description
      StreamUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.io.InputStream getInputStream​(java.lang.String source)
      Get the resource from the file or the jar package From jar file has to be used prefix "classpath:" Zip file resource with prefix: "zip:"
      • Methods inherited from class java.lang.Object

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

      • StreamUtils

        public StreamUtils()
    • Method Detail

      • getInputStream

        public static java.io.InputStream getInputStream​(java.lang.String source)
                                                  throws java.io.FileNotFoundException
        Get the resource from the file or the jar package From jar file has to be used prefix "classpath:" Zip file resource with prefix: "zip:"
        Parameters:
        source - resource
        Returns:
        input stream
        Throws:
        java.io.FileNotFoundException - - if the file not found