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
Nested Classes Modifier and Type Interface Description static class
AttachmentDataStream.FileWrapper
Deprecated.since 7.14 Usecreate(AttachmentDataStreamType, InputStreamSource)
static class
AttachmentDataStream.InputStreamWrapper
Deprecated.since 7.14 Usecreate(AttachmentDataStreamType, InputStreamSource)
static class
AttachmentDataStream.RandomFileWrapper
Deprecated.since 7.14 Usecreate(AttachmentDataStreamType, InputStreamSource)
andlimit(RangeRequest)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static AttachmentDataStream
create(AttachmentDataStreamType type, org.springframework.core.io.InputStreamSource inputStreamSource)
InputStream
getInputStream()
Obtains anInputStream
for this stream.AttachmentDataStreamType
getType()
default AttachmentDataStream
limit(RangeRequest range)
Applies a range limit to the currentAttachmentDataStream
.
-
-
-
Method Detail
-
getType
AttachmentDataStreamType getType()
- Returns:
- The
AttachmentDataStreamType
associated with this stream.
-
getInputStream
InputStream getInputStream() throws IOException
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
default AttachmentDataStream limit(RangeRequest range)
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
-
-