Package org.eclipse.jetty.http
Class MultiPart.ChunksPart
java.lang.Object
org.eclipse.jetty.http.MultiPart.Part
org.eclipse.jetty.http.MultiPart.ChunksPart
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Content.Source.Factory
- Enclosing class:
- MultiPart
A MultiPart.Part
that holds its content in one or more Content.Chunk
s.
-
Constructor Summary
ConstructorsConstructorDescriptionChunksPart
(String name, String fileName, HttpFields fields, List<Content.Chunk> content) -
Method Summary
Modifier and TypeMethodDescriptionvoid
newContentSource
(ByteBufferPool.Sized bufferPool, long first, long length) Creates a newContent.Source
.toString()
Methods inherited from class org.eclipse.jetty.http.MultiPart.Part
close, delete, getContentAsString, getContentSource, getFileName, getHeaders, getLength, getName, newContentSource, writeTo
-
Constructor Details
-
ChunksPart
-
-
Method Details
-
newContentSource
Description copied from class:MultiPart.Part
Creates a newContent.Source
.Returns the content of this part as a new
Content.Source
If the content is reproducible, invoking this method multiple times will return a different independent instance for every invocation.
If the content is not reproducible, subsequent calls to this method will return null.
The content type and content encoding are specified in this part's
headers
.The content encoding may be specified by the part named
_charset_
, as specified in RFC 7578, section 4.6.- Specified by:
newContentSource
in interfaceContent.Source.Factory
- Overrides:
newContentSource
in classMultiPart.Part
- Parameters:
bufferPool
- theByteBufferPool.Sized
to get buffers from.null
means allocate new buffers as needed.first
- the first byte of the resource to start from.length
- the length of the content to make available, -1 for the full length.- Returns:
- a
Content.Source
. - See Also:
-
fail
- Overrides:
fail
in classMultiPart.Part
-
toString
-