Class MultiPartByteRanges

java.lang.Object
org.eclipse.jetty.http.MultiPartByteRanges

public class MultiPartByteRanges extends Object

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: