java.lang.Object
org.eclipse.jetty.http.MultiPart.Part
org.eclipse.jetty.http.MultiPart.ByteBufferPart
- All Implemented Interfaces:
Closeable,AutoCloseable,org.eclipse.jetty.io.Content.Source.Factory
- Enclosing class:
MultiPart
A MultiPart.Part that holds its content in memory,
in one or more ByteBuffers.
-
Constructor Summary
ConstructorsConstructorDescriptionByteBufferPart(String name, String fileName, HttpFields fields, ByteBuffer... buffers) ByteBufferPart(String name, String fileName, HttpFields fields, List<ByteBuffer> content) -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.jetty.io.Content.SourcenewContentSource(org.eclipse.jetty.io.ByteBufferPool.Sized bufferPool, long first, long length) toString()Methods inherited from class org.eclipse.jetty.http.MultiPart.Part
close, delete, fail, getContentAsString, getContentSource, getFileName, getHeaders, getLength, getName, newContentSource, writeTo
-
Constructor Details
-
ByteBufferPart
-
ByteBufferPart
-
-
Method Details
-
newContentSource
public org.eclipse.jetty.io.Content.Source newContentSource(org.eclipse.jetty.io.ByteBufferPool.Sized bufferPool, long first, long length) Description copied from class:MultiPart.PartReturns the content of this part as a new
Content.SourceIf 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:
newContentSourcein interfaceorg.eclipse.jetty.io.Content.Source.Factory- Overrides:
newContentSourcein classMultiPart.Part- See Also:
-
toString
-