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

public Class ResourceHttpContentFactory

extends Object
implements Factory
Class Inheritance
All Implemented Interfaces
org.eclipse.jetty.http.content.HttpContent.Factory
Imports
java.io.IOException, java.nio.file.InvalidPathException, java.util.Objects, org.eclipse.jetty.http.MimeTypes, org.eclipse.jetty.util.resource.Resource, .ResourceFactory, .Resources

An HttpContent.Factory for transient content (not cached). The HttpContent's created by this factory are not intended to be cached, so memory limits for individual HttpOutput streams are enforced.

Field Summary

Modifier and TypeField and Description
private final ResourceFactory
private final MimeTypes

Constructor Summary

AccessConstructor and Description
public

Method Summary

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

Implements org.eclipse.jetty.http.content.HttpContent.Factory.getContent.

private HttpContent
load(String pathInContext, Resource resource)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

_factoryback to summary
private final ResourceFactory _factory
_mimeTypesback to summary
private final MimeTypes _mimeTypes

Constructor Detail

ResourceHttpContentFactoryback to summary
public ResourceHttpContentFactory(ResourceFactory factory, MimeTypes mimeTypes)

Method Detail

getContentback to summary
public HttpContent getContent(String pathInContext) throws IOException

Implements org.eclipse.jetty.http.content.HttpContent.Factory.getContent.

Parameters
pathInContext:String

Doc from org.eclipse.jetty.http.content.HttpContent.Factory.getContent.

The path within the context to the resource

Returns:HttpContent

Doc from org.eclipse.jetty.http.content.HttpContent.Factory.getContent.

A HttpContent

Annotations
@Override
Exceptions
IOException:

Doc from org.eclipse.jetty.http.content.HttpContent.Factory.getContent.

if unable to get content

loadback to summary
private HttpContent load(String pathInContext, Resource resource)
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