需要添加jar:metadata-extractor-2.3.1.jar
代码:
代码:
- public class ImageInfo {
- private Integer id;
- private String author;
- private String desc;
- private String date;
- private String width;
- private String height;
- public ImageInfo(Integer id, String author, String desc,String date) {
- super();
- this.id = id;
- this.author = author;
- this.desc = desc;
- this.date=date;
- }
- public ImageInfo(String author, String desc) {
- super();
- this.id = 0;
- this.author = author;
- this.desc = desc;
- }
- public ImageInfo() {
- super();
- // TODO Auto-generated constructor stub
- }
- /**
- * @return the id
- */
- public Integer getId() {
- return id;
- }
- /**
- * @param id the id to set
- */
- public void setId(Integer id) {
- this.id = id;
- }
- /**
- * @return the author
- */
- public String getAuthor() {
- return author;
- }
- /**
- * @param author the author to set
- */
- public void setAuthor(String author) {
- this.author = author;
- }
- /**
- * @return the desc
- */
- public String getDesc() {
- return desc;
- }
- /**
- * @param desc the desc to set
- */
- public void setDesc(String desc) {
- this.desc = desc;
- }
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- /**
- * @return the date
- */
- public String getDate() {
- return date;
- }
- /**
- * @param date the date to set
- */
- public void setDate(String date) {
- this.date = date;
- }
- /**
- * @return the width
- */
- public String getWidth() {
- return width;
- }
- /**
- * @param width the width to set
- */
- public void setWidth(String width) {
- this.width = width;
- }
- /**
- * @return the height
- */
- public String getHeight() {
- return height;
- }
- /**
- * @param height the height to set
- */
- public void setHeight(String height) {
- this.height = height;
- }
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- @Override
- public String toString() {
- return "ImageInfo [id=" + id + ", author=" + author + ", desc=" + desc
- + ", date=" + date + ", width=" + width + ", height=" + height
- + "]";
- }
- }
public class ImageInfo {
private Integer id;
private String author;
private String desc;
private String date;
private String width;
private String height;
public ImageInfo(Integer id, String author, String desc,String date) {
super();
this.id = id;
this.author = author;
this.desc = desc;
this.date=date;
}
public ImageInfo(String author, String desc) {
super();
this.id = 0;
this.author = author;
this.desc = desc;
}
public ImageInfo() {
super();
// TODO Auto-generated constructor stub
}
/**
* @return the id
*/
public Integer getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(Integer id) {
this.id = id;
}
/**
* @return the author
*/
public String getAuthor() {
return author;
}
/**
* @param author the author to set
*/
public void setAuthor(String author) {
this.author = author;
}
/**
* @return the desc
*/
public String getDesc() {
return desc;
}
/**
* @param desc the desc to set
*/
public void setDesc(String desc) {
this.desc = desc;
}
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
/**
* @return the date
*/
public String getDate() {
return date;
}
/**
* @param date the date to set
*/
public void setDate(String date) {
this.date = date;
}
/**
* @return the width
*/
public String getWidth() {
return width;
}
/**
* @param width the width to set
*/
public void setWidth(String width) {
this.width = width;
}
/**
* @return the height
*/
public String getHeight() {
return height;
}
/**
* @param height the height to set
*/
public void setHeight(String height) {
this.height = height;
}
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
return "ImageInfo [id=" + id + ", author=" + author + ", desc=" + desc
+ ", date=" + date + ", width=" + width + ", height=" + height
+ "]";
}
}