Revert for Java 5 compatibility

This commit is contained in:
Frédéric Brégier 2012-05-10 21:21:19 +03:00
parent fb5eb0afd9
commit 11b139ace7

View File

@ -58,14 +58,14 @@ public class DiskAttribute extends AbstractDiskHttpData implements Attribute {
public String getValue() throws IOException {
byte [] bytes = get();
return new String(bytes, charset);
return new String(bytes, charset.name());
}
public void setValue(String value) throws IOException {
if (value == null) {
throw new NullPointerException("value");
}
byte [] bytes = value.getBytes(charset);
byte [] bytes = value.getBytes(charset.name());
ChannelBuffer buffer = ChannelBuffers.wrappedBuffer(bytes);
if (definedSize > 0) {
definedSize = buffer.readableBytes();