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.InputStreamSourceRepresents the data for an attachment.- Since:
- 5.5
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classAttachmentDataStream.FileWrapperDeprecated.since 7.14 Usecreate(AttachmentDataStreamType, InputStreamSource)static classAttachmentDataStream.InputStreamWrapperDeprecated.since 7.14 Usecreate(AttachmentDataStreamType, InputStreamSource)static classAttachmentDataStream.RandomFileWrapperDeprecated.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 AttachmentDataStreamcreate(AttachmentDataStreamType type, org.springframework.core.io.InputStreamSource inputStreamSource)InputStreamgetInputStream()Obtains anInputStreamfor this stream.AttachmentDataStreamTypegetType()default AttachmentDataStreamlimit(RangeRequest range)Applies a range limit to the currentAttachmentDataStream.
-
-
-
Method Detail
-
getType
AttachmentDataStreamType getType()
- Returns:
- The
AttachmentDataStreamTypeassociated with this stream.
-
getInputStream
InputStream getInputStream() throws IOException
Obtains anInputStreamfor this stream. It is expected that each call creates a fresh stream.- Specified by:
getInputStreamin 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
-
-