* @param position the position of Picasa Photo.
* @throws IOException the url is not exist or something wrong of the server
* of target url.
*/
public void update(String title, String description, Date lastModified, String keywords, Boolean canComment, String position) throws IOException{
HttpRequest httpRequest = new HttpRequest(this.editUrl);
if (this.picasaAlbum.getPicasaWeb().getGoogleapi() != null){
KeyValuePair pair = this.picasaAlbum.getPicasaWeb().getGoogleapi().toAuthHeader();
httpRequest.addHeader(pair.key, pair.value);
}
if (title != null){
this.title = title;
}
if (description != null){
this.description = description;
}
if (lastModified != null){
this.lastModified = lastModified;
}
if (keywords != null){
this.keywords = keywords;
}
if (canComment != null){
this.canComment = canComment;
}
if (position != null){
this.position = position;
}
String data = PicasaPhoto.createPhotoXML(this.title, this.description, this.lastModified, this.keywords, this.canComment, this.position);
httpRequest.setData(data);
httpRequest.setMethod(HttpRequest.METHOD_PUT);
httpRequest.setContentType("application/atom+xml");
String response = httpRequest.send();
}