title: How to simulate a site down in Java?
body: <p>My app accesses info on the web, during my development how do I simulate a site is down in Java ? If the url gets me the page my app processes it, but if a site for some reason is temporarily down, or even if the site is up, but the url returns invalid info or it could be the Internet connection is disabled, how can a Java app distinguish those situations ? And be able to tell which is occurring ?</p>
  
  <p>Edit : I'm trying to write my Java app so that when it encounters different url accesses, it knows which case it is dealing with and tell user accordingly.</p>