mirror of
https://github.com/curl/curl.git
synced 2026-04-15 12:11:42 +03:00
initial java interface commit: IT DOES NOT WORK
This commit is contained in:
parent
d9f989c8c8
commit
d712a4e800
5 changed files with 360 additions and 0 deletions
27
java/test.java
Normal file
27
java/test.java
Normal file
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue