Class TarIterator
- java.lang.Object
-
- org.apache.camel.dataformat.tarfile.TarIterator
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Iterator<org.apache.camel.Message>
public class TarIterator extends Object implements Iterator<org.apache.camel.Message>, Closeable
The Iterator which can go through the TarArchiveInputStream according to TarArchiveEntry Based on ZipIterator from camel-zipfile component
-
-
Field Summary
Fields Modifier and Type Field Description static StringTARFILE_ENTRY_NAME_HEADERHeader where thisTarIteratorwill insert the current entry's file name.
-
Constructor Summary
Constructors Constructor Description TarIterator(org.apache.camel.Exchange exchange, InputStream inputStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckNullAnswer(org.apache.camel.Message answer)voidclose()booleanhasNext()booleanisAllowEmptyDirectory()org.apache.camel.Messagenext()voidremove()voidsetAllowEmptyDirectory(boolean allowEmptyDirectory)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Field Detail
-
TARFILE_ENTRY_NAME_HEADER
public static final String TARFILE_ENTRY_NAME_HEADER
Header where thisTarIteratorwill insert the current entry's file name.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TarIterator
public TarIterator(org.apache.camel.Exchange exchange, InputStream inputStream)
-
-
Method Detail
-
hasNext
public boolean hasNext()
-
next
public org.apache.camel.Message next()
-
checkNullAnswer
public void checkNullAnswer(org.apache.camel.Message answer)
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
isAllowEmptyDirectory
public boolean isAllowEmptyDirectory()
-
setAllowEmptyDirectory
public void setAllowEmptyDirectory(boolean allowEmptyDirectory)
-
-