HttpURLConnection 으로 html 파일로 다운받는 코드 짰는데요
돌리니깐 403에러 뜨는데 왜그런거에요??

public class h_SourceViewer4 {

 /**

 * @param args

 */

 public static void main(String[] args) {

 // TODO Auto-generated method stub


  try {

  URL u = new URL("http://www.google.com/search?원하는검색데이터");

  HttpURLConnection uc = (HttpURLConnection) u.openConnection();


 try (InputStream in = new BufferedInputStream(uc.getInputStream())) {

 Reader r = new InputStreamReader(in);

 FileOutputStream output = new FileOutputStream("E://hanbat.html");

 int c;

 while ((c = r.read()) != -1) {

   output.write(c);

 }

 }

 } catch (MalformedURLException ex) {

 System.err.println("This is not a parseable URL");

 } catch (IOException ex) {

 System.err.println(ex);

 }

}

}



// 해결완료 //