Package net.ontopia.utils
Class StreamUtils
java.lang.Object
net.ontopia.utils.StreamUtils
INTERNAL: Utilities for working with streams and readers.
- Since:
- 1.3.3
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic InputStreamgetInputStream(File basedir, String name) INTERNAL: Returns an input stream for the given url.static InputStreamgetInputStream(String name) INTERNAL: Same as getInputStream(null, name);static URLgetResource(String name) INTERNAL: Returns an input stream for the given url.
-
Field Details
-
CLASSPATH_PREFIX
- See Also:
-
FILE_PREFIX
- See Also:
-
-
Constructor Details
-
StreamUtils
public StreamUtils()
-
-
Method Details
-
getInputStream
INTERNAL: Same as getInputStream(null, name);- Throws:
IOException- Since:
- 3.4.3
-
getInputStream
INTERNAL: Returns an input stream for the given url. Supports file: and classpath:. If no scheme given then file system will be checked before classpath. Exception will be thrown if resource is not found when scheme is given. If no scheme was given null is returned. File references will be interpreted relative to basedir. If basedir is null, it will be ignored.- Throws:
IOException- Since:
- 5.1.1
-
getResource
INTERNAL: Returns an input stream for the given url. Supports file: and classpath:. If no schema given then file system will be checked before classpath. Exception will be thrown if resource is not found when schema is given. If no schema was given null is returned.- Throws:
IOException- Since:
- 3.4.3
-