1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-05 17:15:04 -05:00
curl/java/test.java
2001-04-10 15:29:32 +00:00

28 lines
649 B
Java

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();
}
}