diff src/fdl/URLKicker.java @ 0:083a0b5e12cc

Apply Debug Interface version start
author fuchita
date Thu, 07 Feb 2008 14:21:30 +0900
parents
children 35375016b2f0
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/fdl/URLKicker.java	Thu Feb 07 14:21:30 2008 +0900
@@ -0,0 +1,56 @@
+
+/*
+ * @(#)PSXLindaURLKicker.java       1.1 06/04/01
+ *
+ * Copyright 2006  Shinji KONO
+ * 
+
+   Kick some url
+
+ */
+
+package fdl;
+
+import java.net.*;
+import java.io.*;
+// mport java.nio.*;
+
+
+/**
+ *   URLKicker
+ *
+ * @author Shinji Kono
+ *
+ * @param args[] The URL to connect to
+
+ */
+
+class URLKicker {
+    public static char buf[];
+
+    public static void main (String args[]) {
+	InputStreamReader is;
+	buf = new char[1024];
+	try {
+		URL a = new URL(args[0]);
+		URLConnection conn = a.openConnection();
+		is = new InputStreamReader(conn.getInputStream());
+		int ret = 0;
+		while ((ret = is.read(buf,0,1024)) > 0) {
+		  processBuf(buf,ret);
+		}
+		// close the inputstream
+		is.close();
+	} catch (IOException e) {
+	}
+    }
+    public static void processBuf (char buf[],int len) {
+//	System.out.print("data: ");
+//	for(int i=0;i<len;i++) {
+//	    System.out.print(buf[i]);
+//	}
+    }
+
+}
+    
+