我希望能够建立与网站的连接,但我不希望网站计数器跟踪我并获取有关我的信息。
所以我想问一下我是否使用这个Java代码:
public class ConvertUrlToString {
public static void main(String[] args) {
try {
String webPage = "http://www.google.com";
URL url = new URL(webPage);
URLConnection urlConnection = url.openConnection();
InputStream is = urlConnection.getInputStream();
InputStreamReader isr = new InputStreamReader(is);
int numCharsRead;
char[] charArray = new char[1024];
StringBuffer sb = new StringBuffer();
while ((numCharsRead = isr.read(charArray)) > 0) {
sb.append(charArray, 0, numCharsRead);
}
String result = sb.toString();
System.out.println("*** BEGIN ***");
System.out.println(result);
System.out.println("*** END ***");
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
}
...网站分析引擎(例如google)能够跟踪我并获取有关我的信息吗?