接口 InputStreamSource
- 所有已知子接口:
ContextResource,JarResource,Resource,WritableResource
- 所有已知实现类:
AbstractFileResolvingResource,AbstractResource,ByteArrayResource,ClassPathResource,DefaultResourceLoader.ClassPathContextResource,DescriptiveResource,EncodedResource,FileSystemResource,FileUrlResource,InputStreamResource,JarEntryResource,PathResource,ResourceDecorator,UrlResource,WritableResourceDecorator
- 函数接口:
- 这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。
- 从以下版本开始:
- 2.1.6
- 作者:
- TODAY
2019-07-08 00:12
-
方法概要
修饰符和类型方法说明Get the content of the resource as input stream.default ReaderGetReaderdefault ReaderGetReaderdefault ReadableByteChannelReturn aReadableByteChannel.
-
方法详细资料
-
getInputStream
Get the content of the resource as input stream.- 返回:
- input stream of
Resourcecontent - 抛出:
IOException- If an input exception occurs
-
getReader
GetReader- 抛出:
IOException- If an input exception occurs
-
getReader
GetReader- 参数:
encoding- Charset string- 抛出:
IOException- If an input exception occurs
-
readableChannel
Return aReadableByteChannel.It is expected that each call creates a fresh channel.
The default implementation returns
Channels.newChannel(InputStream)with the result ofgetInputStream().- 返回:
- the byte channel for the underlying resource (must not be
null) - 抛出:
FileNotFoundException- if the underlying resource doesn't existIOException- if the content channel could not be opened- 另请参阅:
-