Class MultiPartByteRanges
java.lang.Object
org.eclipse.jetty.http.MultiPartByteRanges
A CompletableFuture that is completed when a multipart/byteranges
has been parsed asynchronously from a Content.Source.
Once the parsing of the multipart/byteranges content completes successfully,
objects of this class are completed with a MultiPartByteRanges.Parts
object.
Typical usage:
// Some headers that include Content-Type.
HttpFields headers = ...;
String boundary = MultiPart.extractBoundary(headers.get(HttpHeader.CONTENT_TYPE));
// Some multipart/byteranges content.
Content.Source content = ...;
// Create and configure MultiPartByteRanges.
MultiPartByteRanges.Parser byteRanges = new MultiPartByteRanges.Parser(boundary);
// Parse the content.
byteRanges.parse(content)
// When complete, use the parts.
.thenAccept(parts -> ...);
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe multipart/byteranges specific content source.static classA specializedInputStreamContentSourcewhose content is sliced by a byte range.static classstatic classAMultiPart.Partwhose content is a byte range of aResource.static classAn ordered list ofMultiPart.Parts that can be accessed by index, or iterated over.static classDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Content.Source.from(ByteBufferPool.Sized, Path, long, long)