Package org.astrogrid.samp.httpd
Interface ServerResource
-
public interface ServerResourceDefines a resource suitable for serving by theResourceHandlerHTTP server handler.- Since:
- 3 Sep 2008
- Author:
- Mark Taylor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longgetContentLength()Returns the number of bytes in this resource, if known.java.lang.StringgetContentType()Returns the MIME type of this resource.voidwriteBody(java.io.OutputStream out)Writes resource body.
-
-
-
Method Detail
-
getContentType
java.lang.String getContentType()
Returns the MIME type of this resource.- Returns:
- value of Content-Type HTTP header
-
getContentLength
long getContentLength()
Returns the number of bytes in this resource, if known.- Returns:
- value of Content-Length HTTP header if known; otherwise a negative number
-
writeBody
void writeBody(java.io.OutputStream out) throws java.io.IOExceptionWrites resource body.- Parameters:
out- destination stream- Throws:
java.io.IOException
-
-