forked from Archives/Athou_commafeed
trying to fix encoding issues
This commit is contained in:
@@ -12,6 +12,9 @@ import javax.persistence.Table;
|
|||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
|
|
||||||
|
import org.apache.commons.codec.binary.Base64;
|
||||||
|
import org.apache.commons.codec.binary.StringUtils;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "FEEDENTRIES")
|
@Table(name = "FEEDENTRIES")
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
@@ -36,6 +39,15 @@ public class FeedEntry implements Serializable {
|
|||||||
@Temporal(TemporalType.TIMESTAMP)
|
@Temporal(TemporalType.TIMESTAMP)
|
||||||
private Date updated;
|
private Date updated;
|
||||||
|
|
||||||
|
public String getContent() {
|
||||||
|
return StringUtils.newStringUtf8(Base64.decodeBase64(content));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContent(String content) {
|
||||||
|
this.content = Base64.encodeBase64String(StringUtils
|
||||||
|
.getBytesUtf8(content));
|
||||||
|
}
|
||||||
|
|
||||||
public String getGuid() {
|
public String getGuid() {
|
||||||
return guid;
|
return guid;
|
||||||
}
|
}
|
||||||
@@ -52,14 +64,6 @@ public class FeedEntry implements Serializable {
|
|||||||
this.title = title;
|
this.title = title;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getContent() {
|
|
||||||
return content;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setContent(String content) {
|
|
||||||
this.content = content;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUrl() {
|
public String getUrl() {
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user