public class Streams extends Object
Modifier and Type | Method and Description |
---|---|
static ImageInputStream |
Get_Image_Stream(String source)
Obtain an ImageInputStream from a named source.
|
static InputStream |
Get_Stream(String source)
Obtain an InputStream from a named source.
|
public static final String ID
public static InputStream Get_Stream(String source)
The source String is first treated as a URL specification. If this fails the source is treated as a pathname to a locally accessible file. If no file is found the source is treated as the name of a system resource, which can find a file inside a jar file when the application is being run from a jar.
source
- The name of a stream source.public static ImageInputStream Get_Image_Stream(String source)
If a URL can be constructed from the source String an attempt is made to construct an HTTP_ImageInputStream from the URL. If the source is not a valid URL, the source is treated as a pathname to a locally accessible file and an attempt is made to construct a FileImageInputStream from the File.
source
- The name of a stream source.