Home

hexagon_core / com.hexagonkt.helpers / Resource

Resource

class Resource

Absolute resource (start from root package without starting slash). Ie: foo/bar/res.txt instead /foo/bar/res.txt

Constructors

Name Summary
<init> Absolute resource (start from root package without starting slash). Ie: foo/bar/res.txt instead /foo/bar/res.txtResource(path:String)

Properties

Name Summary
path val path:String

Functions

Name Summary
readText fun readText():String?
requireStream fun requireStream():InputStream
requireUrl fun requireUrl():URL
stream fun stream():InputStream?
url fun url():URL?

Extension Functions

Name Summary
parse fun <T :Any>Resource.parse(type:KClass<T>): T
fun <T :Any>Resource.parse(): T
parseObjects fun <T :Any>Resource.parseObjects(type:KClass<T>):List<T>
fun <T :Any>Resource.parseObjects():List<T>