Package org.eclipse.jetty.http.content
Class FileMappingHttpContentFactory
java.lang.Object
org.eclipse.jetty.http.content.FileMappingHttpContentFactory
- All Implemented Interfaces:
HttpContent.Factory
-
Constructor Summary
ConstructorDescriptionConstruct aFileMappingHttpContentFactory
which can use file mapped buffers.FileMappingHttpContentFactory
(HttpContent.Factory factory, int minFileSize) Construct aFileMappingHttpContentFactory
which can use file mapped buffers. -
Method Summary
-
Constructor Details
-
FileMappingHttpContentFactory
Construct aFileMappingHttpContentFactory
which can use file mapped buffers. Uses a default value of 16384 for the minimum size of anHttpContent
before trying to use a file mapped buffer.- Parameters:
factory
- the wrappedHttpContent.Factory
to use.
-
FileMappingHttpContentFactory
Construct aFileMappingHttpContentFactory
which can use file mapped buffers.- Parameters:
factory
- the wrappedHttpContent.Factory
to use.minFileSize
- the minimum size of anHttpContent
before trying to use a file mapped buffer.
-
-
Method Details
-
getContent
- Specified by:
getContent
in interfaceHttpContent.Factory
- Parameters:
path
- The path within the context to the resource- Returns:
- A
HttpContent
- Throws:
IOException
- if unable to get content
-