Class MultiPartByteRanges.Part
java.lang.Object
org.eclipse.jetty.http.MultiPart.Part
org.eclipse.jetty.http.MultiPartByteRanges.Part
- All Implemented Interfaces:
Closeable
,AutoCloseable
,org.eclipse.jetty.io.Content.Source.Factory
- Enclosing class:
MultiPartByteRanges
A MultiPart.Part
whose content is a byte range of a Resource
.
-
Constructor Summary
ConstructorsConstructorDescriptionPart
(String contentType, org.eclipse.jetty.util.resource.Resource resource, ByteRange byteRange, long contentLength) Part
(String contentType, org.eclipse.jetty.util.resource.Resource resource, ByteRange byteRange, long contentLength, org.eclipse.jetty.io.ByteBufferPool bufferPool) Deprecated, for removal: This API element is subject to removal in a future version.Part
(String contentType, org.eclipse.jetty.util.resource.Resource resource, ByteRange byteRange, long contentLength, org.eclipse.jetty.io.ByteBufferPool.Sized bufferPool) Part
(HttpFields headers, org.eclipse.jetty.util.resource.Resource resource, ByteRange byteRange) Part
(HttpFields headers, org.eclipse.jetty.util.resource.Resource resource, ByteRange byteRange, org.eclipse.jetty.io.ByteBufferPool bufferPool) Deprecated, for removal: This API element is subject to removal in a future version.Part
(HttpFields headers, org.eclipse.jetty.util.resource.Resource resource, ByteRange byteRange, org.eclipse.jetty.io.ByteBufferPool.Sized bufferPool) -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.jetty.io.Content.Source
newContentSource
(org.eclipse.jetty.io.ByteBufferPool.Sized bufferPool, long first, long length) Methods inherited from class org.eclipse.jetty.http.MultiPart.Part
close, delete, fail, getContentAsString, getContentSource, getFileName, getHeaders, getLength, getName, newContentSource, writeTo
-
Constructor Details
-
Part
-
Part
@Deprecated(since="12.0.20", forRemoval=true) public Part(String contentType, org.eclipse.jetty.util.resource.Resource resource, ByteRange byteRange, long contentLength, org.eclipse.jetty.io.ByteBufferPool bufferPool) Deprecated, for removal: This API element is subject to removal in a future version. -
Part
-
Part
public Part(HttpFields headers, org.eclipse.jetty.util.resource.Resource resource, ByteRange byteRange) -
Part
@Deprecated(since="12.0.20", forRemoval=true) public Part(HttpFields headers, org.eclipse.jetty.util.resource.Resource resource, ByteRange byteRange, org.eclipse.jetty.io.ByteBufferPool bufferPool) Deprecated, for removal: This API element is subject to removal in a future version. -
Part
public Part(HttpFields headers, org.eclipse.jetty.util.resource.Resource resource, ByteRange byteRange, org.eclipse.jetty.io.ByteBufferPool.Sized bufferPool)
-
-
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.Part
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 interfaceorg.eclipse.jetty.io.Content.Source.Factory
- Overrides:
newContentSource
in classMultiPart.Part
- See Also:
-
Part(String, Resource, ByteRange, long, ByteBufferPool.Sized)
instead.