From d712a4e800ea002a1d980b201d28f033d2bcc8cb Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 10 Apr 2001 15:29:32 +0000 Subject: initial java interface commit: IT DOES NOT WORK --- java/test.java | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 java/test.java (limited to 'java/test.java') 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(); + } +} + -- cgit v1.2.3