Package pygmy.nntp

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


        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

Related Classes of pygmy.nntp.NntpInputStream

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.