Top Description Inners Methods
org.eclipse.jetty.http.content

public Interface HttpContent

Known Direct Subinterfaces
org.eclipse.jetty.http.content.CachingHttpContentFactory.CachingHttpContent
Known Direct Implementers
org.eclipse.jetty.http.content.HttpContent.Wrapper, org.eclipse.jetty.http.content.PreCompressedHttpContent, org.eclipse.jetty.http.content.ResourceHttpContent
Imports
java.io.IOException, java.nio.ByteBuffer, java.time.Instant, java.util.Set, org.eclipse.jetty.http.CompressedContentFormat, .HttpField, .MimeTypes.Type, org.eclipse.jetty.util.resource.Resource

HttpContent interface.

This information represents all the information about a static resource that is needed to evaluate conditional headers and to serve the content if need be. It can be implemented either transiently (values and fields generated on demand) or persistently (values and fields pre-generated in anticipation of reuse in from a cache).

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
public static class
HttpContent.Wrapper

HttpContent Wrapper.

Method Summary

Modifier and TypeMethod and Description
public ByteBuffer

Returns:

a ByteBuffer instance or null.
getByteBuffer
()

Get this HTTP content as a ByteBuffer if possible.

public default long
public String
public HttpField
public String
public HttpField
public long
public HttpField
public String
public HttpField
public String
public HttpField
public Instant
public String
public MimeTypes.Type
public Set<CompressedContentFormat>
getPreCompressedContentFormats()

Returns: Set of available pre-compressed formats for this content, or null if this has not been checked.

public Resource
public void

Method Detail

getByteBufferback to summary
public ByteBuffer getByteBuffer()

Get this HTTP content as a ByteBuffer if possible.

Each invocation returns a new ByteBuffer instance that is read-only and contains valid data between the pos and the limit.

Returns:ByteBuffer

a ByteBuffer instance or null.

getBytesOccupiedback to summary
public default long getBytesOccupied()
getCharacterEncodingback to summary
public String getCharacterEncoding()
getContentEncodingback to summary
public HttpField getContentEncoding()
getContentEncodingValueback to summary
public String getContentEncodingValue()
getContentLengthback to summary
public HttpField getContentLength()
getContentLengthValueback to summary
public long getContentLengthValue()
getContentTypeback to summary
public HttpField getContentType()
getContentTypeValueback to summary
public String getContentTypeValue()
getETagback to summary
public HttpField getETag()
getETagValueback to summary
public String getETagValue()
getLastModifiedback to summary
public HttpField getLastModified()
getLastModifiedInstantback to summary
public Instant getLastModifiedInstant()
getLastModifiedValueback to summary
public String getLastModifiedValue()
getMimeTypeback to summary
public MimeTypes.Type getMimeType()
getPreCompressedContentFormatsback to summary
public Set<CompressedContentFormat> getPreCompressedContentFormats()
Returns:Set<CompressedContentFormat>

Set of available pre-compressed formats for this content, or null if this has not been checked.

getResourceback to summary
public Resource getResource()
releaseback to summary
public void release()
org.eclipse.jetty.http.content back to summary

public Interface HttpContent.Factory

Known Direct Implementers
org.eclipse.jetty.http.content.PreCompressedHttpContentFactory, org.eclipse.jetty.http.content.ResourceHttpContentFactory, org.eclipse.jetty.http.content.VirtualHttpContentFactory, org.eclipse.jetty.http.content.CachingHttpContentFactory, org.eclipse.jetty.http.content.FileMappingHttpContentFactory

Method Summary

Modifier and TypeMethod and Description
public HttpContent
getContent(String
The path within the context to the resource
path
)

Returns: A HttpContent

Method Detail

getContentback to summary
public HttpContent getContent(String path) throws IOException
Parameters
path:String

The path within the context to the resource

Returns:HttpContent

A HttpContent

Exceptions
IOException:
if unable to get content
org.eclipse.jetty.http.content back to summary

public Class HttpContent.Wrapper

extends Object
implements HttpContent
Class Inheritance
All Implemented Interfaces
org.eclipse.jetty.http.content.HttpContent
Known Direct Subclasses
org.eclipse.jetty.http.content.PreCompressedHttpContentFactory.CompressedFormatsHttpContent, org.eclipse.jetty.http.content.CachingHttpContentFactory.CachedHttpContent, org.eclipse.jetty.http.content.FileMappingHttpContentFactory.FileMappedHttpContent

HttpContent Wrapper.

Field Summary

Modifier and TypeField and Description
private final HttpContent

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ByteBuffer
getByteBuffer()

Implements org.eclipse.jetty.http.content.HttpContent.getByteBuffer.

Get this HTTP content as a ByteBuffer if possible.

public long
public String
public HttpField
public String
public HttpField
public long
public HttpField
public String
public HttpField
public String
public HttpField
public Instant
public String
public MimeTypes.Type
public Set<CompressedContentFormat>
public Resource
public HttpContent
public void
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

_delegateback to summary
private final HttpContent _delegate

Constructor Detail

Wrapperback to summary
public Wrapper(HttpContent content)

Method Detail

getByteBufferback to summary
public ByteBuffer getByteBuffer()

Implements org.eclipse.jetty.http.content.HttpContent.getByteBuffer.

Doc from org.eclipse.jetty.http.content.HttpContent.getByteBuffer.

Get this HTTP content as a ByteBuffer if possible.

Each invocation returns a new ByteBuffer instance that is read-only and contains valid data between the pos and the limit.

Returns:ByteBuffer

a ByteBuffer instance or null.

Annotations
@Override
getBytesOccupiedback to summary
public long getBytesOccupied()

Overrides default org.eclipse.jetty.http.content.HttpContent.getBytesOccupied.

Annotations
@Override
getCharacterEncodingback to summary
public String getCharacterEncoding()

Implements org.eclipse.jetty.http.content.HttpContent.getCharacterEncoding.

Annotations
@Override
getContentEncodingback to summary
public HttpField getContentEncoding()

Implements org.eclipse.jetty.http.content.HttpContent.getContentEncoding.

Annotations
@Override
getContentEncodingValueback to summary
public String getContentEncodingValue()

Implements org.eclipse.jetty.http.content.HttpContent.getContentEncodingValue.

Annotations
@Override
getContentLengthback to summary
public HttpField getContentLength()

Implements org.eclipse.jetty.http.content.HttpContent.getContentLength.

Annotations
@Override
getContentLengthValueback to summary
public long getContentLengthValue()

Implements org.eclipse.jetty.http.content.HttpContent.getContentLengthValue.

Annotations
@Override
getContentTypeback to summary
public HttpField getContentType()

Implements org.eclipse.jetty.http.content.HttpContent.getContentType.

Annotations
@Override
getContentTypeValueback to summary
public String getContentTypeValue()

Implements org.eclipse.jetty.http.content.HttpContent.getContentTypeValue.

Annotations
@Override
getETagback to summary
public HttpField getETag()

Implements org.eclipse.jetty.http.content.HttpContent.getETag.

Annotations
@Override
getETagValueback to summary
public String getETagValue()

Implements org.eclipse.jetty.http.content.HttpContent.getETagValue.

Annotations
@Override
getLastModifiedback to summary
public HttpField getLastModified()

Implements org.eclipse.jetty.http.content.HttpContent.getLastModified.

Annotations
@Override
getLastModifiedInstantback to summary
public Instant getLastModifiedInstant()

Implements org.eclipse.jetty.http.content.HttpContent.getLastModifiedInstant.

Annotations
@Override
getLastModifiedValueback to summary
public String getLastModifiedValue()

Implements org.eclipse.jetty.http.content.HttpContent.getLastModifiedValue.

Annotations
@Override
getMimeTypeback to summary
public MimeTypes.Type getMimeType()

Implements org.eclipse.jetty.http.content.HttpContent.getMimeType.

Annotations
@Override
getPreCompressedContentFormatsback to summary
public Set<CompressedContentFormat> getPreCompressedContentFormats()

Implements org.eclipse.jetty.http.content.HttpContent.getPreCompressedContentFormats.

Returns:Set<CompressedContentFormat>

Doc from org.eclipse.jetty.http.content.HttpContent.getPreCompressedContentFormats.

Set of available pre-compressed formats for this content, or null if this has not been checked.

Annotations
@Override
getResourceback to summary
public Resource getResource()

Implements org.eclipse.jetty.http.content.HttpContent.getResource.

Annotations
@Override
getWrappedback to summary
public HttpContent getWrapped()
releaseback to summary
public void release()

Implements org.eclipse.jetty.http.content.HttpContent.release.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override