ResourceRegions.
| Modifier and Type | Field and Description |
|---|---|
| public static final String | BOUNDARY_STRING_HINT
The hint key that contains the boundary string. |
| private final int | |
| public static final int | DEFAULT_BUFFER_SIZE
The default buffer size used by the encoder. |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | canEncode(ResolvableType
the type of elements in the source stream elementType, MimeType the MIME type for the output stream
(can be mimeType)null if not specified)Overrides org. Implements org. |
| private OptionalLong | Returns: the contentLength of the resourcethe resource instance resource)Determine, if possible, the contentLength of the given resource without reading it. |
| public Flux | encode(Publisher<? extends ResourceRegion>
the input stream of Objects to encode. If the input should be
encoded as a single value rather than as a stream of elements, an instance of
input, DataBufferFactory Mono should be used.for creating output stream bufferFactory, ResolvableType DataBuffer'sthe expected type of elements in the input stream;
this type must have been previously passed to the elementType, MimeType canEncode
method and it must have returned true.the MIME type for the output content (optional) mimeType, Map<String, Object> additional information about how to encode hints)Implements org. T into a DataBuffer
output stream.
|
| private byte[] | |
| private DataBuffer | |
| private byte[] | |
| private Flux | writeResourceRegion(ResourceRegion region, DataBufferFactory bufferFactory, Map<String, Object> hints)
|
| BOUNDARY_STRING_HINT | back to summary |
|---|---|
| public static final String BOUNDARY_STRING_HINT The hint key that contains the boundary string. | |
| bufferSize | back to summary |
|---|---|
| private final int bufferSize | |
| DEFAULT_BUFFER_SIZE | back to summary |
|---|---|
| public static final int DEFAULT_BUFFER_SIZE The default buffer size used by the encoder. | |
| ResourceRegionEncoder | back to summary |
|---|---|
| public ResourceRegionEncoder() | |
| ResourceRegionEncoder | back to summary |
|---|---|
| public ResourceRegionEncoder(int bufferSize) | |
| canEncode | back to summary |
|---|---|
| public boolean canEncode(ResolvableType elementType, MimeType mimeType) Overrides org. Implements org. Doc from org. Whether the encoder supports the given source element type and the MIME type for the output stream.
| |
| contentLength | back to summary |
|---|---|
| private OptionalLong contentLength(Resource resource) Determine, if possible, the contentLength of the given resource without reading it.
| |
| encode | back to summary |
|---|---|
| public Flux Implements org. Doc from org. Encode a stream of Objects of type
| |
| getContentRangeHeader | back to summary |
|---|---|
| private byte[] getContentRangeHeader(ResourceRegion region) | |
| getRegionSuffix | back to summary |
|---|---|
| private DataBuffer getRegionSuffix(DataBufferFactory bufferFactory, String boundaryString) | |
| toAsciiBytes | back to summary |
|---|---|
| private byte[] toAsciiBytes(String in) | |
| writeResourceRegion | back to summary |
|---|---|
| private Flux | |