接口 InputStreamSource

    • 方法详细资料

      • getInputStream

        java.io.InputStream getInputStream()
                                    throws java.io.IOException
        Return an InputStream for the content of an underlying resource.

        It is expected that each call creates a fresh stream.

        This requirement is particularly important when you consider an API such as JavaMail, which needs to be able to read the stream multiple times when creating mail attachments. For such a use case, it is required that each getInputStream() call returns a fresh stream.

        返回:
        the input stream for the underlying resource (must not be null)
        抛出:
        java.io.FileNotFoundException - if the underlying resource does not exist
        java.io.IOException - if the content stream could not be opened
        另请参阅:
        Resource.isReadable()