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.TemporalType;
|
||||
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.apache.commons.codec.binary.StringUtils;
|
||||
|
||||
@Entity
|
||||
@Table(name = "FEEDENTRIES")
|
||||
@SuppressWarnings("serial")
|
||||
@@ -36,6 +39,15 @@ public class FeedEntry implements Serializable {
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
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() {
|
||||
return guid;
|
||||
}
|
||||
@@ -52,14 +64,6 @@ public class FeedEntry implements Serializable {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user