aboutsummaryrefslogtreecommitdiff
path: root/java/test.java
blob: 33da880302c3775f7684598f7dbc98d863f186dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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();
    }
}