|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface GetableResource
webDAV GET and HEAD
| Method Summary | |
|---|---|
java.lang.Long |
getContentLength()
The length of the content in this resource. |
java.lang.String |
getContentType(java.lang.String accepts)
Given a comma separated listed of preferred content types acceptable for a client, return one content type which is the best. |
java.lang.Long |
getMaxAgeSeconds(Auth auth)
How many seconds to allow the content to be cached for, or null if caching is not allowed The provided auth object allows this method to determine an appropriate caching time depending on authenticated context. |
void |
sendContent(java.io.OutputStream out,
Range range,
java.util.Map<java.lang.String,java.lang.String> params,
java.lang.String contentType)
Send the resource's content using the given output stream. |
| Methods inherited from interface com.bradmcevoy.http.Resource |
|---|
authenticate, authorise, checkRedirect, getModifiedDate, getName, getRealm, getUniqueId |
| Method Detail |
|---|
void sendContent(java.io.OutputStream out,
Range range,
java.util.Map<java.lang.String,java.lang.String> params,
java.lang.String contentType)
throws java.io.IOException,
NotAuthorizedException,
BadRequestException
out - - the output stream to send the content torange - - null for normal GET's, not null for partial GET's. May be ignoredparams - - request parameterscontentType - - the contentType selected by negotiation
java.io.IOException - - if there is an exception writing content to the output stream. This
indicates that the client has disconnected (as frequently occurs with http transfers). DO NOT
throw an IOException if there was an internal error generating the response (eg if reading from a database)
NotAuthorizedException
BadRequestExceptionjava.lang.Long getMaxAgeSeconds(Auth auth)
java.lang.String getContentType(java.lang.String accepts)
String mime = ContentTypeUtils.findContentTypes( this.file ); return ContentTypeUtils.findAcceptableContentType( mime, preferredList );
ContentTypeUtilsjava.lang.Long getContentLength()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||