Package io.milton.resource
Interface PutableResource
- All Superinterfaces:
CollectionResource,Resource
- All Known Subinterfaces:
FolderResource,LockNullResource
-
Method Summary
Methods inherited from interface io.milton.resource.CollectionResource
child, getChildrenMethods inherited from interface io.milton.resource.Resource
authenticate, authorise, checkRedirect, getModifiedDate, getName, getRealm, getUniqueId
-
Method Details
-
createNew
Resource createNew(String newName, InputStream inputStream, Long length, String contentType) throws IOException, io.milton.http.exceptions.ConflictException, io.milton.http.exceptions.NotAuthorizedException, io.milton.http.exceptions.BadRequestException Create a new resource, or overwrite an existing one- Parameters:
newName- - the name to create within the collection. E.g. myFile.txtinputStream- - the data to populate the resource withlength- - the length of the datacontentType- - the content type of the data being uploaded. This can be a list, such as "image/pjpeg,image/jpeg". It is the responsibility of the application to create a resource which also represents those content types, or a subset- Returns:
- - a reference to the new resource
- Throws:
IOExceptionio.milton.http.exceptions.ConflictExceptionio.milton.http.exceptions.NotAuthorizedExceptionio.milton.http.exceptions.BadRequestException
-