remove using deprecated method

This commit is contained in:
kimchy 2010-05-13 17:00:16 +03:00
parent 6a20ca562c
commit a9cac052ec
1 changed files with 4 additions and 1 deletions

View File

@ -25,6 +25,7 @@ import org.elasticsearch.rest.support.RestUtils;
import org.jboss.netty.handler.codec.http.HttpHeaders;
import org.jboss.netty.handler.codec.http.HttpMethod;
import java.nio.charset.Charset;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -99,8 +100,10 @@ public class NettyHttpRequest extends AbstractRestRequest implements HttpRequest
return data;
}
private static Charset UTF8 = Charset.forName("UTF-8");
@Override public String contentAsString() {
return request.getContent().toString("UTF-8");
return request.getContent().toString(UTF8);
}
@Override public Set<String> headerNames() {