Package org.eclipse.jetty.http
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
Modifier and TypeClassDescriptionstatic class
The multipart/byteranges specific content source.static class
A specializedInputStreamContentSource
whose content is sliced by a byte range.static class
static class
AMultiPart.Part
whose content is a byte range of aResource
.static class
An ordered list ofMultiPart.Part
s that can be accessed by index, or iterated over.static class
Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Content.Source.from(ByteBufferPool.Sized, Path, long, long)