Provider

interface Provider

Provides source from various input format.

Types

Companion
Link copied to clipboard
object Companion

Functions

bytes
Link copied to clipboard
open fun bytes(content: ByteArray): Source
Returns a new source from specified byte array.
open fun bytes(content: ByteArray, offset: Int, length: Int): Source
Returns a new source from specified portion of byte array.
file
Link copied to clipboard
open fun file(file: File, optional: Boolean = false): Source
Returns a new source from specified file.
open fun file(file: String, optional: Boolean = false): Source
Returns a new source from specified file path.
inputStream
Link copied to clipboard
abstract fun inputStream(inputStream: InputStream): Source
Returns a new source from specified input stream.
map
Link copied to clipboard
open fun map(transform: (Source) -> Source): Provider
Returns a provider providing sources that applying the given transform function.
reader
Link copied to clipboard
abstract fun reader(reader: Reader): Source
Returns a new source from specified reader.
resource
Link copied to clipboard
open fun resource(resource: String, optional: Boolean = false): Source
Returns a new source from specified resource.
string
Link copied to clipboard
open fun string(content: String): Source
Returns a new source from specified string.
url
Link copied to clipboard
open fun url(url: URL, optional: Boolean = false): Source
Returns a new source from specified url.
open fun url(url: String, optional: Boolean = false): Source
Returns a new source from specified url string.

Inheritors

JsonProvider
Link copied to clipboard
PropertiesProvider
Link copied to clipboard

Sources

jvm source
Link copied to clipboard