remove unecessary .name() to Charset in String methods

This commit is contained in:
Frédéric Brégier 2012-05-10 20:54:40 +03:00
parent b05fe03615
commit eac75ddfbb

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.name());
return new String(bytes, charset);
}
public void setValue(String value) throws IOException {
if (value == null) {
throw new NullPointerException("value");
}
byte [] bytes = value.getBytes(charset.name());
byte [] bytes = value.getBytes(charset);
ChannelBuffer buffer = ChannelBuffers.wrappedBuffer(bytes);
if (definedSize > 0) {
definedSize = buffer.readableBytes();