Examples of NntpInputStream


Examples of pygmy.nntp.NntpInputStream

        return group;
    }

    public static Article createArticle(String filename) throws IOException {
        File file = new File( System.getProperty("nntp.root"), filename );
        NntpInputStream is = null;
        try {
            is = new NntpInputStream( new FileInputStream( file ) );
            Article article = new Article( is );
            return article;
        } finally {
            if( is != null ) {
                is.close();
            }
        }
    }
View Full Code Here

Examples of pygmy.nntp.NntpInputStream

        String testText3 = "." + Http.CRLF;
        buffer.append( "." );
        buffer.append( testText3 );
        writeTextEnd(buffer);

        NntpInputStream stream = new NntpInputStream( new ByteArrayInputStream( buffer.toString().getBytes() ) );
        assertEquals( testText, stream.readText() );
        assertEquals( testText2,  stream.readText() );
        assertEquals( testText3,  stream.readText() );
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.