open class InputStreamResource : AbstractResource
Resource implementation for a given InputStream.
Should only be used if no other specific Resource implementation is applicable. In particular, prefer ByteArrayResource or any of the file-based Resource implementations where possible.
In contrast to other Resource implementations, this is a descriptor for an already opened resource - therefore returning true from #isOpen(). Do not use an InputStreamResource if you need to keep the resource descriptor somewhere, or if you need to read from a stream multiple times.
Author
Juergen Hoeller
Author
Sam Brannen
Since
28.12.2003
See Also
ByteArrayResourceClassPathResourceFileSystemResourceUrlResource
InputStreamResource(inputStream: InputStream)InputStreamResource(inputStream: InputStream, description: String)
Create a new InputStreamResource. |
open fun equals(other: Any?): Boolean
This implementation compares the underlying InputStream. |
|
open fun exists(): Boolean
This implementation always returns |
|
open fun getDescription(): String
This implementation returns a description that includes the passed-in description, if any. |
|
open fun getInputStream(): InputStream
This implementation throws IllegalStateException if attempting to read the underlying stream multiple times. |
|
open fun hashCode(): Int
This implementation returns the hash code of the underlying InputStream. |
|
open fun isOpen(): Boolean
This implementation always returns |