Package fr.gouv.vitam.storage.offers.tape.cas

# Class TarHelper

java.lang.Object
fr.gouv.vitam.storage.offers.tape.cas.TarHelper

public final class TarHelper extends Object

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TarHelper()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static InputStream`
  `readEntryAtPos(FileInputStream fileInputStream, TarEntryDescription entryDescription)`
  Gets an input stream for a specific tar entry.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### TarHelper

    public TarHelper()

- ## Method Details

  - ### readEntryAtPos

    public static InputStream readEntryAtPos(FileInputStream fileInputStream, TarEntryDescription entryDescription) throws IOException
    Gets an input stream for a specific tar entry. Entry size invalid input: '&' entry name invalid input: '&' digest are validated to ensure data coherence.
    Parameters:
      `fileInputStream` - file input stream of the tar file to read from. It is NOT closed by this method and must closed by caller.
      `entryDescription` - the tar entry description (file position, size, digest...)
    Returns:
      Tar entry input stream. Closing this input streams does NOT close inner fileInputStream.
    Throws:
      `IOException` - if any IO error occurs