aboutsummaryrefslogtreecommitdiff
path: root/java/test.java
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-04-10 15:29:32 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-04-10 15:29:32 +0000
commitd712a4e800ea002a1d980b201d28f033d2bcc8cb (patch)
treee2828dafd168a80e862e1d122f0509e9fedd58e0 /java/test.java
parentd9f989c8c8f2d529c722fca859c152b0cbd462b1 (diff)
initial java interface commit: IT DOES NOT WORK
Diffstat (limited to 'java/test.java')
-rw-r--r--java/test.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/java/test.java b/java/test.java
new file mode 100644
index 000000000..33da88030
--- /dev/null
+++ b/java/test.java
@@ -0,0 +1,27 @@
+import CurlGlue;
+import CurlWrite;
+
+class test implements CurlWrite {
+ public int handleString(byte s[])
+ {
+ /* output everything */
+ System.out.println("IIIIIIIIIII -------------- OOOOOOOOOOOOOOOOOOO");
+ try {
+ System.out.write(s);
+ }
+ catch (java.io.IOException moo) {
+ // nothing
+ }
+ return 0;
+ }
+
+ public static void main(String[] args)
+ {
+ CurlGlue cg = new CurlGlue();
+ test cw = new test();
+ cg.setopt(CurlGlue.CURLOPT_URL, "http://www.contactor.se/");
+ cg.setopt(CurlGlue.CURLOPT_WRITEFUNCTION, cw);
+ cg.perform();
+ }
+}
+