Share

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.dump.DumpArchiveInputStream' - 1 code snippet(s) found

 Sample 1. Code Sample / Example / Snippet of org.apache.commons.compress.archivers.dump.DumpArchiveInputStream

    public void testConsumesArchiveCompletely() throws Exception {

final InputStream is = DumpArchiveInputStreamTest.class

.getResourceAsStream("/archive_with_trailer.dump");

final DumpArchiveInputStream dump = new DumpArchiveInputStream(is);

while (dump.getNextDumpEntry() != null) {

}

final byte[] expected = new byte[] {

'H', 'e', 'l', 'l', 'o', ',', ' ', 'w', 'o', 'r', 'l', 'd', '!', ' '

};

final byte[] actual = new byte[expected.length];

is.read(actual);

assertArrayEquals(expected, actual);

dump.close();

}


   Like      Feedback      org.apache.commons.compress.archivers.dump.DumpArchiveInputStream



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



comments powered by Disqus