Package dev.enola.common.io.resource
Interface MultipartResource
- All Known Implementing Classes:
DelegatingMultipartResource,MarkdownResource,RegexMultipartResource
public interface MultipartResource
MultipartResources are "logical" resources which do have an URI, but are composed of multiple
"parts" which are independent (sub)resources, each with their own
MediaType and content.
Examples could be Emails with attachments (RFC 2045 & 2046), or files on operating systems with file systems where a single file can contain multiple alternative data streams (e.g. NTFS, and old classic Mac OS's HFS with data & resources forks), or things like the frontmatter resources.
The URI of the sub-resources should correspond to the "parent" MultipartResource's URI appended by the part name as a #fragment.
This interface intentionally does not extend Resource, because not all implementations
will have a "root" resource (although some may).
-
Field Summary
Fields -
Method Summary
-
Field Details
-
MEDIA_TYPE
-
-
Method Details
-
mediaType
MediaType defaults toMEDIA_TYPE. Implementations may or may not return media types with charset parameters, as that's also specified on parts, and the encoding may or may not be the same for each of them. -
uri
-
parts
-
part
-