|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface InputStreamSource
Simple interface for objects that are sources for a java.io.InputStream
.
Base interface for Spring's more extensive Resource interface.
Useful as an abstract content source for mail attachments, for example. Spring's ByteArrayResource or any file-based Resource implementation can be used as concrete instance, allowing to read the underlying content stream multiple times. For single-use streams, InputStreamResource can be used for any given InputStream.
InputStream
,
Resource
,
InputStreamResource
,
ByteArrayResource
Method Summary | |
---|---|
InputStream |
getInputStream()
Return an InputStream. |
Method Detail |
---|
InputStream getInputStream() throws IOException
For creating mail attachments, note that JavaMail needs to be able to
read the stream multiple times. For such a use case, it is required
that each getInputStream()
call returns a fresh stream.
IOException
- if the stream could not be openedMimeMessageHelper.addAttachment(String, InputStreamSource)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |