public class PutHelper extends Object
| Constructor and Description |
|---|
PutHelper() |
| Modifier and Type | Method and Description |
|---|---|
void |
applyPartialUpdate(GetableResource replacee,
Request request,
Range range,
OutputStream tempOut)
Copy the current content of the resource to the outputstream, except
writing the new partial update for the given range.
|
String |
findContentTypes(Request request,
String newName)
returns a textual representation of the list of content types for the
new resource.
|
CollectionResource |
findNearestParent(HttpManager manager,
String host,
Path path) |
Long |
getContentLength(Request request) |
Range |
parseContentRange(Resource r,
Request request)
Largly copied from tomcat
See the spec
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
|
public Range parseContentRange(Resource r, Request request) throws IOException, BadRequestException
r - request - IOExceptionBadRequestException - - if the range header is invalidpublic Long getContentLength(Request request) throws BadRequestException
BadRequestExceptionpublic String findContentTypes(Request request, String newName)
request - newName - public CollectionResource findNearestParent(HttpManager manager, String host, Path path) throws NotAuthorizedException, ConflictException, BadRequestException
public void applyPartialUpdate(GetableResource replacee, Request request, Range range, OutputStream tempOut) throws NotAuthorizedException, BadRequestException, NotFoundException
replacee - - the resource to get the content for and to updaterequest - range - tempOut - NotAuthorizedExceptionBadRequestExceptionNotFoundExceptionCopyright © 2021 McEvoy Software Ltd. All rights reserved.