User:Titoxd/sandbox
Appearance
import java.net.*; import java.io.*; import javax.swing.JOptionPane; public class URLConnectionReader { private static final String KILLURL = "http://en.wikipedia.org/w/index.php?title=Wikipedia:WikiProject_edit_counters/Flcelloguy%27s_Tool/Configs&action=raw"; static String initURL = "http://en.wikipedia.org/w/index.php?title=Special:Contributions&target="; static String userName = "Titoxd"; static String midURL = "&offset=0&limit="; static int limit = 10; public static void main(String[] args) throws Exception { //String finURL = KILLURL; String finURL = initURL + userName + midURL + limit; URL wikiUrl = new URL(finURL); URLConnection uc = wikiUrl.openConnection(); uc.setReadTimeout(0); BufferedReader in = new BufferedReader(new InputStreamReader(uc .getInputStream())); String inputLine; FileWriter writer = new FileWriter("C:\\killText.txt"); BufferedWriter out = new BufferedWriter(writer); while ((inputLine = in.readLine()) != null) { out.write(inputLine); out.newLine(); } out.close(); int c = JOptionPane.showConfirmDialog(null, "Hello"); in.close(); } }