Search Java Code Snippets

  Help us in improving the repository. Add new snippets through 'Submit Code Snippet ' link.

#Java - Code Snippets for '#Org.apache.commons.compress.archivers.arj.ArjArchiveInputStream' - 1 code snippet(s) found

 Sample 1. Code Sample / Example / Snippet of org.apache.commons.compress.archivers.arj.ArjArchiveInputStream

    public void testArjUnarchive() throws Exception {

final StringBuilder expected = new StringBuilder();

expected.append("test1.xml<?xml version="1.0"?> ");

expected.append("<empty/>test2.xml<?xml version="1.0"?> ");

expected.append("<empty/> ");

final ArjArchiveInputStream in = new ArjArchiveInputStream(new FileInputStream(getFile("bla.arj")));

ArjArchiveEntry entry;

final StringBuilder result = new StringBuilder();

while ((entry = in.getNextEntry()) != null) {


int tmp;

while ((tmp = != -1) {

result.append((char) tmp);





assertEquals(result.toString(), expected.toString());


   Like      Feedback      org.apache.commons.compress.archivers.arj.ArjArchiveInputStream

Subscribe to Java News and Posts. Get latest updates and posts on Java from
Enter your email address:
Delivered by FeedBurner

comments powered by Disqus