Package gnu.inet.nntp

Examples of gnu.inet.nntp.LineIterator


        // TODO start a thread to get list of articles
        Thread t = new Thread() {
            // get first connection
            private NNTPConnection con = usedConnections.get(0);
            public void run() {
                LineIterator ait;
                try {
                    ait = con.newNews(group.getName(), group.getLastUpdate(), null);
                    System.out.println("NEW NEWS: ");
                    while(ait.hasNext()) {
                        //TODO get new articles for this group
                        System.out.println(ait.nextLine());
                    }
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
View Full Code Here


        // TODO start a thread to get list of articles
        Thread t = new Thread() {
            // get first connection
            private NNTPConnection con = usedConnections.get(0);
            public void run() {
                LineIterator lit;
                try {
                    lit = con.newGroups(date, null);
                    System.out.println("NEW NEWS: ");
                    while(lit.hasNext()) {
                        //TODO get new groups
                        System.out.println(lit.nextLine());
                        //TODO fire NewGroupEvent
                    }
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
View Full Code Here

TOP

Related Classes of gnu.inet.nntp.LineIterator

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.