hi
I have a problem with javafx brower(
2523487
I want to implement my HttpURLConnection which extends sun.net.www.protocol.http.HttpURLConnection.
@Override
public synchronized InputStream getInputStream() throws IOException {
InputStream is=super.getInputStream();
if(this.url.toExternalForm().startsWith("http://map.baidu.com/su")){
super.getHeaderField("Content-Type");
//I want to modify response header here.
}
return is;
}
but the response headers are stored in " private MessageHeader responses;". I can't modify it.
I want to copy sun.net.www.protocol.http.HttpURLConnection out and modify it myself. but I can't get source codes of it in JDK/src.zip.
I searched and found http://grepcode.com/snapshot/repository.grepcode.com/java/root/jdk/openjdk/7-b147/
but it depends so many things of sun.net package.
any good method for me ? thanks.