public abstract class AbstractHttpResourceFactory extends Object implements HttpResourceFactory
HttpResourceFactory
.Constructor and Description |
---|
AbstractHttpResourceFactory() |
Modifier and Type | Method and Description |
---|---|
void |
addHttpFileDescriber(HttpFileDescriber httpFileDescriber)
Adds a
HttpFileDescriber to describe the HttpFile
instances. |
protected void |
describeFile(HttpFileDescription fileDescription)
Describes the
HttpFile . |
static ByteBuffer |
getHttpResourceContents(InputStream content,
String path)
Obtains the contents of the
HttpResource for the
InputStream . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createHttpResource
public static ByteBuffer getHttpResourceContents(InputStream content, String path)
HttpResource
for the
InputStream
.content
- InputStream
containing contents of
HttpResource
.path
- Path for logging potential issue in obtaining content.InputStream
for the HttpResource
. May be
null
.protected void describeFile(HttpFileDescription fileDescription)
Describes the HttpFile
.
Only registered HttpFileDescriber
instances are used therefore it
is possible that the HttpFile
may not be able to be described.
fileDescription
- HttpFileDescription
.public void addHttpFileDescriber(HttpFileDescriber httpFileDescriber)
HttpResourceFactory
Adds a HttpFileDescriber
to describe the HttpFile
instances.
The HttpFileDescriber
instances are to be used in the order
added. Once a HttpFileDescription
is provided, the remaining
HttpFileDescriber
instances will not be used.
addHttpFileDescriber
in interface HttpResourceFactory
httpFileDescriber
- HttpFileDescriber
to describe the HttpFile
.Copyright © 2005–2016. All rights reserved.