Class TarHelper

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

public final class TarHelper extends Object
  • 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 & entry name & 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