public class ResourceHttpContent extends 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.Factory| Constructor and Description |
|---|
ResourceHttpContent(Resource resource,
String contentType) |
ResourceHttpContent(Resource resource,
String contentType,
int maxBuffer) |
ResourceHttpContent(Resource resource,
String contentType,
int maxBuffer,
HttpContent gzip) |
| Modifier and Type | Method and Description |
|---|---|
String |
getCharacterEncoding() |
HttpField |
getContentEncoding() |
String |
getContentEncodingValue() |
HttpField |
getContentLength() |
long |
getContentLengthValue() |
HttpField |
getContentType() |
String |
getContentTypeValue() |
ByteBuffer |
getDirectBuffer() |
HttpField |
getETag() |
String |
getETagValue() |
HttpContent |
getGzipContent() |
ByteBuffer |
getIndirectBuffer() |
InputStream |
getInputStream() |
HttpField |
getLastModified() |
String |
getLastModifiedValue() |
MimeTypes.Type |
getMimeType() |
ReadableByteChannel |
getReadableByteChannel() |
Resource |
getResource() |
void |
release() |
String |
toString() |
public ResourceHttpContent(Resource resource, String contentType, int maxBuffer)
public ResourceHttpContent(Resource resource, String contentType, int maxBuffer, HttpContent gzip)
public String getContentTypeValue()
getContentTypeValue in interface HttpContentpublic HttpField getContentType()
getContentType in interface HttpContentpublic HttpField getContentEncoding()
getContentEncoding in interface HttpContentpublic String getContentEncodingValue()
getContentEncodingValue in interface HttpContentpublic String getCharacterEncoding()
getCharacterEncoding in interface HttpContentpublic MimeTypes.Type getMimeType()
getMimeType in interface HttpContentpublic HttpField getLastModified()
getLastModified in interface HttpContentpublic String getLastModifiedValue()
getLastModifiedValue in interface HttpContentpublic ByteBuffer getDirectBuffer()
getDirectBuffer in interface HttpContentpublic HttpField getETag()
getETag in interface HttpContentpublic String getETagValue()
getETagValue in interface HttpContentpublic ByteBuffer getIndirectBuffer()
getIndirectBuffer in interface HttpContentpublic HttpField getContentLength()
getContentLength in interface HttpContentpublic long getContentLengthValue()
getContentLengthValue in interface HttpContentpublic InputStream getInputStream() throws IOException
getInputStream in interface HttpContentIOExceptionpublic ReadableByteChannel getReadableByteChannel() throws IOException
getReadableByteChannel in interface HttpContentIOExceptionpublic Resource getResource()
getResource in interface HttpContentpublic void release()
release in interface HttpContentpublic HttpContent getGzipContent()
getGzipContent in interface HttpContentCopyright © 1995-2016 Webtide. All Rights Reserved.