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