unwrapping of call depth (one call less for UTF8.String)

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7784 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 14 years ago
parent f30d36b101
commit 16327d1cbe

@ -26,6 +26,7 @@ package net.yacy.cora.document;
import java.io.UnsupportedEncodingException;
import java.nio.charset.Charset;
import org.apache.http.entity.mime.content.StringBody;
/**
@ -51,7 +52,7 @@ public class UTF8 {
public final static StringBody StringBody(final String s) {
try {
return new StringBody(s, charset);
} catch (UnsupportedEncodingException e) {
} catch (final UnsupportedEncodingException e) {
e.printStackTrace();
return null;
}
@ -64,7 +65,7 @@ public class UTF8 {
* @return
*/
public final static String String(final byte[] bytes) {
return new String(bytes, charset);
return new String(bytes, 0, bytes.length, charset);
}
public final static String String(final byte[] bytes, final int offset, final int length) {

Loading…
Cancel
Save