我有以下Java代码:
HttpURLConnection connection = (HttpURLConnection)new URL(url).openConnection();
connection.setRequestProperty("User-Agent","");
connection.setInstanceFollowRedirects(true);
int responseCode = connection.getResponseCode();
当响应代码为300时,如何提取响应正文中提供的URL?
由于