Package gnu.inet.nntp

Examples of gnu.inet.nntp.ArticleNumberIterator


            // get first connection
            private NNTPConnection con = usedConnections.get(0);
            private Stack<Integer> articlesIds = new Stack<Integer>();
           
            public void run() {
                ArticleNumberIterator ait;
                try {
                    ait = con.listGroup(g.getName());
                    while(ait.hasNext()) {
                        Integer id = (Integer) ait.next();
                        System.out.println("Got article ID '" + id + "'");
                        //TODO check if ArticleResponse, int articleID or Article is returned
                        articlesIds.push(id);
                        Thread.sleep(2);
                    }
View Full Code Here


        Thread t = new Thread() {
            // get first connection
            NNTPConnection con = usedConnections.get(0);
           
            public void run() {
                ArticleNumberIterator ait;
                try {
                    ait = con.listGroup(g.getName());
                    while(ait.hasNext()) {
                        //TODO check if ArticleResponse, int articleID or Article is returned
                        int aid = (Integer) ait.next();
                        ArticleResponse a = con.head(aid);
                        StringWriter sw = new StringWriter();
                        PrintWriter pw = new PrintWriter(sw);
                        BufferedReader br = new BufferedReader(new InputStreamReader(a.in));
                        String line = null;
View Full Code Here

        Thread t = new Thread() {
            // get first connection
            private NNTPConnection con = usedConnections.get(0);
           
            public void run() {
                ArticleNumberIterator ait;
                try {
                    ait = con.listGroup(g.getName());
                    while(ait.hasNext()) {
                        //TODO check if ArticleResponse, int articleID or Article is returned
                        int aid = (Integer) ait.next();
                        ArticleResponse a = con.body(aid);
                        StringWriter sw = new StringWriter();
                        PrintWriter pw = new PrintWriter(sw);
                        BufferedReader br = new BufferedReader(new InputStreamReader(a.in));
                        String line = null;
View Full Code Here

            NNTPConnection con = usedConnections.get(0);
            Stack<Integer> articlesIds = new Stack<Integer>();
           
//            public void run() {
                try {
                    ArticleNumberIterator ait = con.listGroup(g.getName());
                    while(ait.hasNext()) {
                        Integer id = (Integer) ait.next();
                        System.out.println("Got article ID '" + id + "'");
                        //TODO check if ArticleResponse, int articleID or Article is returned
                        articlesIds.push(id);
//                        Thread.sleep(2);
                    }
View Full Code Here

TOP

Related Classes of gnu.inet.nntp.ArticleNumberIterator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.