Package pygmy.core

Examples of pygmy.core.InternetOutputStream


        saveArticle(article);
    }

    private void saveArticle(Article article) throws IOException {
        File articleFile = new File( newsgroupFile, getIndexFile(article.getArticleNumber()) );
        InternetOutputStream stream = new InternetOutputStream( new FileOutputStream( articleFile ) );
        try {
            article.save( stream );
        } finally {
            stream.flush();
            stream.close();
        }
    }
View Full Code Here


    }

    protected byte[] getArticleBytes( String filename ) throws IOException {
        Article article = NntpTestUtil.createArticle( filename );
        ByteArrayOutputStream articleBaos = new ByteArrayOutputStream();
        article.save( new InternetOutputStream( articleBaos ) );
        return articleBaos.toByteArray();
    }
View Full Code Here

TOP

Related Classes of pygmy.core.InternetOutputStream

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.