Package-level declarations

Types

Link copied to clipboard

直接使用 ByteArray 作为 data 结果的 Resource 实现。

Link copied to clipboard

FileResource 接口表示一个可从文件获取流的资源。 该接口提供一个 File 对象和两种方法来获取输入流和读取文件的字节数组。

Link copied to clipboard

能够获取到 InputStream 资源的 Resource 扩展实现。

Link copied to clipboard

PathResource 接口表示一个可从 Path 获取流的资源。 该接口提供一个 Path 对象和两种方法来获取输入流和读取文件的字节数组。

Link copied to clipboard

能够获取到 Reader 资源的 Resource 扩展实现。

Link copied to clipboard
interface Resource

一个资源

Link copied to clipboard

基于 Base64Resource 序列化器。

Link copied to clipboard

可以读取到 String 格式内容的 Resource

Link copied to clipboard

URIResource 是一个输入流资源的接口。

Functions

Link copied to clipboard

通过提供的 ByteArray 直接构建一个 Resource

@JvmName(name = "valueOf")
fun File.toResource(charset: Charset = Charsets.UTF_8): FileResource

Converts a File to a FileResource.

@JvmName(name = "valueOf")
fun URI.toResource(charset: Charset = Charsets.UTF_8): URIResource

Converts the current URI to a URIResource.

@JvmName(name = "valueOf")
fun URL.toResource(charset: Charset = Charsets.UTF_8): URIResource

Converts the current URL to a URIResource.

@JvmName(name = "valueOf")
fun Path.toResource(charset: Charset = Charsets.UTF_8, vararg options: OpenOption): PathResource

Converts the given Path to a PathResource with the specified options.

Link copied to clipboard

通过提供的 String 直接构建一个 StringResource