PathResource

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

Author

forte

Properties

Link copied to clipboard
abstract val path: Path

与此资源关联的 Path

Functions

Link copied to clipboard
open override fun data(): ByteArray

将与此资源关联的 Path 读取为字节数组

Link copied to clipboard
abstract override fun inputStream(): InputStream

从与此资源关联的 Path 创建新的 InputStream

Link copied to clipboard
abstract override fun reader(): Reader

从与此资源关联的 Path 创建新的 Reader

Link copied to clipboard
abstract override fun string(): String

将与此资源关联的 Path 读取为字符串

Link copied to clipboard

将给定的 Resource 转换为 OfflineImage

Link copied to clipboard