Search Java Code Snippets

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

Java - Code Samples

 Sample 1. Code Sample / Example / Snippet of org.apache.commons.compress.archivers.tar.TarArchiveInputStream

    public void readSimplePaxHeader() throws Exception {

final InputStream is = new ByteArrayInputStream(new byte[1]);

final TarArchiveInputStream tais = new TarArchiveInputStream(is);

final Map<String, String> headers = tais

.parsePaxHeaders(new ByteArrayInputStream("30 atime=1321711775.972059463 "


assertEquals(1, headers.size());

assertEquals("1321711775.972059463", headers.get("atime"));



   Like      Feedback      org.apache.commons.compress.archivers.tar.TarArchiveInputStream

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