trying to fix encoding issues

This commit is contained in:
Athou
2013-03-23 01:08:34 +01:00
parent 6c41af280a
commit e779e1ff67

View File

@@ -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;
} }