Add tags

Add tags to the following comment
GETしてどうするか決まっていないのですが、標準出力にそのまま書き出しています。
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
import java.net.URL;
import java.net.URLConnection;
import java.io.InputStream;
import java.io.IOException;

public class Sample {

    static final String url = "http://ja.doukaku.org/feeds/comments/";
    static final int BUFFER_SIZE = 2048;

    public static void main(String[] args) throws IOException {
        URLConnection uc = new URL(url).openConnection();
        InputStream is = uc.getInputStream();
        byte[] buffer = new byte[BUFFER_SIZE];
        int r;
        while ((r = is.read(buffer)) > 0) {
            System.out.write(buffer, 0, r);
        }
    }
}

Add tags

The input will be splited to tags with space.

Index

Feed

Other

Link

Pathtraq

loading...