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

public Class ResourceHttpContent

extends Object
implements HttpContent
Class Inheritance
All Implemented Interfaces
org.eclipse.jetty.http.content.HttpContent
Imports
java.nio.ByteBuffer, java.nio.file.Path, java.time.Instant, java.util.Set, org.eclipse.jetty.http.CompressedContentFormat, .DateGenerator, .EtagUtils, .HttpField, .HttpHeader, .MimeTypes, .MimeTypes.Type, org.eclipse.jetty.util.resource.Resource

HttpContent created from a Resource.

The HttpContent is used to server static content that is not cached. So fields and values are only generated as need be an not kept for reuse

Field Summary

Modifier and TypeField and Description
pack-priv final String
pack-priv final HttpField
pack-priv final Path
pack-priv final Resource

Constructor Summary

AccessConstructor and Description
public
ResourceHttpContent(final Resource resource, final String contentType)

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 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 void
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

_contentTypeback to summary
pack-priv final String _contentType
_etagback to summary
pack-priv final HttpField _etag
_pathback to summary
pack-priv final Path _path
_resourceback to summary
pack-priv final Resource _resource

Constructor Detail

ResourceHttpContentback to summary
public ResourceHttpContent(final Resource resource, final String contentType)

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
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
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.

Returns:String

a string representation of the object.

Annotations
@Override