Top Description Inners Fields Constructors Methods
org.eclipse.jetty.http

public Class MultiPart

extends Object
Class Inheritance
Imports
java.io.Closeable, .EOFException, .IOException, .OutputStream, .UncheckedIOException, java.nio.ByteBuffer, java.nio.charset.Charset, java.nio.file.Files, .Path, .StandardCopyOption, java.util.ArrayDeque, .ArrayList, .HashMap, .Iterator, .List, .Map, .Objects, .Queue, java.util.concurrent.ThreadLocalRandom, org.eclipse.jetty.io.Content, org.eclipse.jetty.io.content.ByteBufferContentSource, .ChunksContentSource, .PathContentSource, org.eclipse.jetty.util.BufferUtil, .IO, .QuotedStringTokenizer, .SearchPattern, .StaticException, .StringUtil, .Utf8StringBuilder, org.eclipse.jetty.util.thread.AutoLock, .SerializedInvoker, org.slf4j.Logger, .LoggerFactory

Namespace class for interrelated classes that provide support for parsing and generating multipart bytes.

Most applications should make use of MultiPartFormData or MultiPartByteRanges as they provide a simpler API.

Multipart parsing is provided by Parser.

Multipart generation is provided by AbstractContentSource and its subclasses.

A single part of a multipart content is represented by Part and its subclasses.

See Also
MultiPartFormData, MultiPartByteRanges

Nested and Inner Type Summary

Modifier and TypeClass and Description
public abstract static class
MultiPart.AbstractContentSource

An asynchronous Content.Source where Parts can be added to it to form a multipart content.

public abstract static class
public static class
MultiPart.ByteBufferPart

A Part that holds its content in memory, in one or more ByteBuffers.

public static class
MultiPart.ChunksPart

A Part that holds its content in one or more Content.Chunks.

public static class
public static class
MultiPart.Parser

A multipart/form-data parser that follows RFC 7578.

public abstract static class
MultiPart.Part

A single part of a multipart content.

public static class
MultiPart.PathPart

A Part whose content is in a file.

Field Summary

Modifier and TypeField and Description
private static final QuotedStringTokenizer
private static final Logger
private static final int

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static String

Returns:

the value of the boundary parameter, or null if the boundary parameter is missing
extractBoundary
(String
the Content-Type header value
contentType
)

Extracts the value of the boundary parameter from the Content-Type header value, or returns null if the boundary parameter is missing.

public static String

Returns:

a boundary string
generateBoundary
(String
a possibly null prefix
prefix
,
int
a number of random characters to add after the prefix
randomLength
)

Generates a multipart boundary, made of the given optional prefix string and the given number of random characters.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait