- All Known Implementing Classes:
BasicServlet.FileContent, BasicServlet.JarContent, BasicServlet.LimitFileContent
- Enclosing class:
BasicServlet
public static interface BasicServlet.HttpContent
From Jetty HttpContent.java.
Method Summary
All MethodsModifier and TypeMethodDescriptionintIn seconds.longContent length.Content type.Input stream.longLast modified.
Method Details
getContentType
String getContentType()Content type.- Returns:
- the MIME type of the content, as sent in the Content-Type header
getLastModified
long getLastModified()Last modified.- Returns:
- the last modification time in milliseconds since the epoch
getCacheTime
int getCacheTime()In seconds.- Returns:
- how long the content may be cached, in seconds
getContentLength
long getContentLength()Content length.- Returns:
- the size of the content in bytes
getInputStream
Input stream.- Returns:
- a fresh stream over the content, which the caller must close
- Throws:
IOException- if the content cannot be opened for reading