Package org.opentrafficsim.base
Class Resource
java.lang.Object
org.opentrafficsim.base.Resource
Resource utility.
Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Method Summary
Modifier and TypeMethodDescriptionstatic InputStream
getResourceAsStream
(String name) Obtains stream for resource, either in IDE or java.static URI
getResourceAsUri
(String name) Obtains URI for resource, either in IDE or java.
-
Method Details
-
getResourceAsStream
Obtains stream for resource, either in IDE or java.- Parameters:
name
- String; name of resource- Returns:
- the resolved input stream
-
getResourceAsUri
Obtains URI for resource, either in IDE or java.- Parameters:
name
- String; name of resource- Returns:
- the resolved URI
- Throws:
URISyntaxException
- when the file name is malformed.
-