Home

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> Resource(path:String)
Absolute resource (start from root package without starting slash). Ie: foo/bar/res.txt instead /foo/bar/res.txt

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
convertToMap funAny.convertToMap():Map<*, *>
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>
serialize funAny.serialize(format:SerializationFormat= defaultFormat):String
funAny.serialize(contentType:String):String