in = url.openStream();
int all = url.openConnection().getContentLength();
byte[] b = new byte[all];
int index = 0;
int count = in.read(b, index, all);
while (count != -1) {
index += count;
count = in.read(b, index, 1);
}
String str = new String(b, "gb2312");
注意:获取用byte读取内容,其他的如字符串读取,则不能解决问题