Package org.eclipse.jetty.http
Class ResourceHttpContent
- java.lang.Object
-
- org.eclipse.jetty.http.ResourceHttpContent
-
- All Implemented Interfaces:
HttpContent
public class ResourceHttpContent extends java.lang.Object implements HttpContent
HttpContent created from aResource
.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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.http.HttpContent
HttpContent.ContentFactory
-
-
Constructor Summary
Constructors Constructor Description ResourceHttpContent(Resource resource, java.lang.String contentType)
ResourceHttpContent(Resource resource, java.lang.String contentType, int maxBuffer)
ResourceHttpContent(Resource resource, java.lang.String contentType, int maxBuffer, java.util.Map<CompressedContentFormat,HttpContent> precompressedContents)
-
Method Summary
All Methods Instance Methods Concrete Methods 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()
Resource
getResource()
void
release()
java.lang.String
toString()
-
-
-
Constructor Detail
-
ResourceHttpContent
public ResourceHttpContent(Resource resource, java.lang.String contentType)
-
ResourceHttpContent
public ResourceHttpContent(Resource resource, java.lang.String contentType, int maxBuffer)
-
ResourceHttpContent
public ResourceHttpContent(Resource resource, java.lang.String contentType, int maxBuffer, java.util.Map<CompressedContentFormat,HttpContent> precompressedContents)
-
-
Method Detail
-
getContentTypeValue
public java.lang.String getContentTypeValue()
- Specified by:
getContentTypeValue
in interfaceHttpContent
-
getContentType
public HttpField getContentType()
- Specified by:
getContentType
in interfaceHttpContent
-
getContentEncoding
public HttpField getContentEncoding()
- Specified by:
getContentEncoding
in interfaceHttpContent
-
getContentEncodingValue
public java.lang.String getContentEncodingValue()
- Specified by:
getContentEncodingValue
in interfaceHttpContent
-
getCharacterEncoding
public java.lang.String getCharacterEncoding()
- Specified by:
getCharacterEncoding
in interfaceHttpContent
-
getMimeType
public MimeTypes.Type getMimeType()
- Specified by:
getMimeType
in interfaceHttpContent
-
getLastModified
public HttpField getLastModified()
- Specified by:
getLastModified
in interfaceHttpContent
-
getLastModifiedValue
public java.lang.String getLastModifiedValue()
- Specified by:
getLastModifiedValue
in interfaceHttpContent
-
getDirectBuffer
public java.nio.ByteBuffer getDirectBuffer()
- Specified by:
getDirectBuffer
in interfaceHttpContent
-
getETag
public HttpField getETag()
- Specified by:
getETag
in interfaceHttpContent
-
getETagValue
public java.lang.String getETagValue()
- Specified by:
getETagValue
in interfaceHttpContent
-
getIndirectBuffer
public java.nio.ByteBuffer getIndirectBuffer()
- Specified by:
getIndirectBuffer
in interfaceHttpContent
-
getContentLength
public HttpField getContentLength()
- Specified by:
getContentLength
in interfaceHttpContent
-
getContentLengthValue
public long getContentLengthValue()
- Specified by:
getContentLengthValue
in interfaceHttpContent
-
getInputStream
public java.io.InputStream getInputStream() throws java.io.IOException
- Specified by:
getInputStream
in interfaceHttpContent
- Throws:
java.io.IOException
-
getReadableByteChannel
public java.nio.channels.ReadableByteChannel getReadableByteChannel() throws java.io.IOException
- Specified by:
getReadableByteChannel
in interfaceHttpContent
- Throws:
java.io.IOException
-
getResource
public Resource getResource()
- Specified by:
getResource
in interfaceHttpContent
-
release
public void release()
- Specified by:
release
in interfaceHttpContent
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getPrecompressedContents
public java.util.Map<CompressedContentFormat,HttpContent> getPrecompressedContents()
- Specified by:
getPrecompressedContents
in interfaceHttpContent
-
-