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
| Constructor and Description |
|---|
ResourceHttpContent(Resource resource,
String contentType) |
ResourceHttpContent(Resource resource,
String contentType,
boolean etag) |
ResourceHttpContent(Resource resource,
String contentType,
int maxBuffer) |
ResourceHttpContent(Resource resource,
String contentType,
int maxBuffer,
boolean etag) |
| Modifier and Type | Method and Description |
|---|---|
String |
getCharacterEncoding() |
HttpField |
getContentLength() |
long |
getContentLengthValue() |
HttpField |
getContentType() |
String |
getContentTypeValue() |
ByteBuffer |
getDirectBuffer() |
HttpField |
getETag() |
String |
getETagValue() |
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 String getContentTypeValue()
getContentTypeValue in interface HttpContentpublic HttpField getContentType()
getContentType 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 HttpContentCopyright © 1995-2015 Webtide. All Rights Reserved.