Interface AttachmentDataStream
- All Superinterfaces:
org.springframework.core.io.InputStreamSource
- All Known Implementing Classes:
AttachmentDataStream.FileWrapper
,AttachmentDataStream.InputStreamWrapper
,AttachmentDataStream.RandomFileWrapper
public interface AttachmentDataStream
extends org.springframework.core.io.InputStreamSource
Represents the data for an attachment.
- Since:
- 5.5
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Deprecated.static class
Deprecated.since 7.14 Usecreate(AttachmentDataStreamType, InputStreamSource)
static class
Deprecated.since 7.14 Usecreate(AttachmentDataStreamType, InputStreamSource)
andlimit(RangeRequest)
-
Method Summary
Modifier and TypeMethodDescriptionstatic AttachmentDataStream
create
(AttachmentDataStreamType type, org.springframework.core.io.InputStreamSource inputStreamSource) Obtains anInputStream
for this stream.getType()
default AttachmentDataStream
limit
(RangeRequest range) Applies a range limit to the currentAttachmentDataStream
.
-
Method Details
-
getType
AttachmentDataStreamType getType()- Returns:
- The
AttachmentDataStreamType
associated with this stream.
-
getInputStream
Obtains anInputStream
for this stream. It is expected that each call creates a fresh stream.- Specified by:
getInputStream
in interfaceorg.springframework.core.io.InputStreamSource
- Throws:
IOException
-
limit
Applies a range limit to the currentAttachmentDataStream
.- Since:
- 7.14
-
create
static AttachmentDataStream create(AttachmentDataStreamType type, org.springframework.core.io.InputStreamSource inputStreamSource) - Since:
- 7.14
-
create(AttachmentDataStreamType, InputStreamSource)