List of usage examples for java.net URLConnection getUseCaches
public boolean getUseCaches()
From source file:Main.java
public static void main(String args[]) throws Exception { URL u = new URL("http://www.java2s.com"); URLConnection uc = u.openConnection(); System.out.println(uc.getUseCaches()); }
From source file:MainClass.java
public static void main(String[] args) { URL u;//from ww w. j a v a 2s . c om URLConnection uc; try { u = new URL("http://www.java2s.com"); try { uc = u.openConnection(); if (uc.getUseCaches()) { uc.setUseCaches(false); } } catch (IOException e) { System.err.println(e); } } catch (MalformedURLException e) { System.err.println(e); } }