com.bradmcevoy.http
Interface PutableResource

All Superinterfaces:
CollectionResource, Resource
All Known Subinterfaces:
FolderResource, LockNullResource

public interface PutableResource
extends CollectionResource


Method Summary
 Resource createNew(java.lang.String newName, java.io.InputStream inputStream, java.lang.Long length, java.lang.String contentType)
          Create a new resource, or overwrite an existing one
 
Methods inherited from interface com.bradmcevoy.http.CollectionResource
child, getChildren
 
Methods inherited from interface com.bradmcevoy.http.Resource
authenticate, authorise, checkRedirect, getModifiedDate, getName, getRealm, getUniqueId
 

Method Detail

createNew

Resource createNew(java.lang.String newName,
                   java.io.InputStream inputStream,
                   java.lang.Long length,
                   java.lang.String contentType)
                   throws java.io.IOException,
                          ConflictException,
                          NotAuthorizedException,
                          BadRequestException
Create a new resource, or overwrite an existing one

Parameters:
newName - - the name to create within the collection. E.g. myFile.txt
inputStream - - the data to populate the resource with
length - - the length of the data
contentType - - the content type to create
Returns:
- a reference to the new resource
Throws:
java.io.IOException
ConflictException
NotAuthorizedException
BadRequestException


Copyright © 2011. All Rights Reserved.