Companion

object Companion

Functions

Link copied to clipboard
fun File.toResource(name: String = toString()): FileResource

使用 File 作为一个 StandardResource.

拷贝提供的 inputStream 并作为 StandardResource 返回。 不会自动关闭 inputStream, 需要由调用者处理。

fun URL.toResource(name: String = toString()): URLResource

使用 URL 作为一个 StandardResource.

fun Path.toResource(name: String = toString()): PathResource

使用 Path 作为一个 StandardResource.

使用字节数组作为一个 StandardResource.