Class TarAppender
- java.lang.Object
-
- fr.gouv.vitam.storage.offers.tape.cas.TarAppender
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class TarAppender extends java.lang.Object implements java.lang.AutoCloseable
-
-
Constructor Summary
Constructors Constructor Description TarAppender(java.io.OutputStream outputStream, java.lang.String tarId, long maxTarSize)
TarAppender(java.nio.file.Path outputTarFilePath, java.lang.String tarId, long maxTarSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TarEntryDescription
append(java.lang.String entryName, java.io.InputStream inputStream, long size)
boolean
canAppend(long size)
void
close()
void
flush()
long
getBytesWritten()
java.lang.String
getDigestValue()
int
getEntryCount()
java.lang.String
getTarId()
-
-
-
Method Detail
-
canAppend
public boolean canAppend(long size)
-
append
public TarEntryDescription append(java.lang.String entryName, java.io.InputStream inputStream, long size) throws java.io.IOException
- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOException
- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Throws:
java.io.IOException
-
getTarId
public java.lang.String getTarId()
-
getEntryCount
public int getEntryCount()
-
getBytesWritten
public long getBytesWritten()
-
getDigestValue
public java.lang.String getDigestValue()
-
-