HttpContentpublic class ResourceHttpContent extends java.lang.Object implements HttpContent
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
HttpContent.ContentFactory| Constructor | Description |
|---|---|
ResourceHttpContent(org.eclipse.jetty.util.resource.Resource resource,
java.lang.String contentType) |
|
ResourceHttpContent(org.eclipse.jetty.util.resource.Resource resource,
java.lang.String contentType,
int maxBuffer) |
|
ResourceHttpContent(org.eclipse.jetty.util.resource.Resource resource,
java.lang.String contentType,
int maxBuffer,
java.util.Map<CompressedContentFormat,HttpContent> precompressedContents) |
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.String |
getCharacterEncoding() |
|
HttpField |
getContentEncoding() |
|
java.lang.String |
getContentEncodingValue() |
|
HttpField |
getContentLength() |
|
long |
getContentLengthValue() |
|
HttpField |
getContentType() |
|
java.lang.String |
getContentTypeValue() |
|
java.nio.ByteBuffer |
getDirectBuffer() |
|
HttpField |
getETag() |
|
java.lang.String |
getETagValue() |
|
java.nio.ByteBuffer |
getIndirectBuffer() |
|
java.io.InputStream |
getInputStream() |
|
HttpField |
getLastModified() |
|
java.lang.String |
getLastModifiedValue() |
|
MimeTypes.Type |
getMimeType() |
|
java.util.Map<CompressedContentFormat,HttpContent> |
getPrecompressedContents() |
|
java.nio.channels.ReadableByteChannel |
getReadableByteChannel() |
|
org.eclipse.jetty.util.resource.Resource |
getResource() |
|
void |
release() |
|
java.lang.String |
toString() |
public ResourceHttpContent(org.eclipse.jetty.util.resource.Resource resource,
java.lang.String contentType)
public ResourceHttpContent(org.eclipse.jetty.util.resource.Resource resource,
java.lang.String contentType,
int maxBuffer)
public ResourceHttpContent(org.eclipse.jetty.util.resource.Resource resource,
java.lang.String contentType,
int maxBuffer,
java.util.Map<CompressedContentFormat,HttpContent> precompressedContents)
public java.lang.String getContentTypeValue()
getContentTypeValue in interface HttpContentpublic HttpField getContentType()
getContentType in interface HttpContentpublic HttpField getContentEncoding()
getContentEncoding in interface HttpContentpublic java.lang.String getContentEncodingValue()
getContentEncodingValue in interface HttpContentpublic java.lang.String getCharacterEncoding()
getCharacterEncoding in interface HttpContentpublic MimeTypes.Type getMimeType()
getMimeType in interface HttpContentpublic HttpField getLastModified()
getLastModified in interface HttpContentpublic java.lang.String getLastModifiedValue()
getLastModifiedValue in interface HttpContentpublic java.nio.ByteBuffer getDirectBuffer()
getDirectBuffer in interface HttpContentpublic HttpField getETag()
getETag in interface HttpContentpublic java.lang.String getETagValue()
getETagValue in interface HttpContentpublic java.nio.ByteBuffer getIndirectBuffer()
getIndirectBuffer in interface HttpContentpublic HttpField getContentLength()
getContentLength in interface HttpContentpublic long getContentLengthValue()
getContentLengthValue in interface HttpContentpublic java.io.InputStream getInputStream()
throws java.io.IOException
getInputStream in interface HttpContentjava.io.IOExceptionpublic java.nio.channels.ReadableByteChannel getReadableByteChannel()
throws java.io.IOException
getReadableByteChannel in interface HttpContentjava.io.IOExceptionpublic org.eclipse.jetty.util.resource.Resource getResource()
getResource in interface HttpContentpublic void release()
release in interface HttpContentpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.util.Map<CompressedContentFormat,HttpContent> getPrecompressedContents()
getPrecompressedContents in interface HttpContentCopyright © 1995–2018 Webtide. All rights reserved.