U
- The archive builder implementation.V
- The type of settings used for the archive builder implementation.public interface StreamAddCapableArchiveBuilder<U extends StreamAddCapableArchiveBuilder<U,V>,V extends ArchiveEntrySettings<V>> extends ArchiveBuilder<U,V>
ArchiveBuilder
interface with the
capability to add data from InputStream
:s to the archive.
Since the size of data in a stream is not known beforehand, this requires that the archive builder has random access to the file it builds since it has to rewind it to write a file entry's size after adding the entry itself. This makes it impossible to write the archive to a stream.
Modifier and Type | Method and Description |
---|---|
U |
add(InputStream is,
org.entityfs.el.AbsoluteLocation entityLocation)
Add a file entry containing all data that can be read from the supplied
stream.
|
U |
add(InputStream is,
org.entityfs.el.AbsoluteLocation entityLocation,
V settings)
Add a file entry containing all data that can be read from the supplied
stream.
|
add, add, add, add, add, add, add, add, add, addRecursively, addRecursively, addRecursively, addRecursively, addRecursively, addRule, addRules, close, getDefaultDirectoryEntrySettings, getDefaultFileEntrySettings, getRules, isClosed, removeRule, setDefaultDirectoryEntrySettings, setDefaultFileEntrySettings
U add(InputStream is, org.entityfs.el.AbsoluteLocation entityLocation) throws IllegalStateException, org.entityfs.support.exception.WrappedIOException, ArchiveEntryAddException
is
- The stream to read file data from. The stream is not
closed by this method.entityLocation
- The location of the file entry in the archive.this
.IllegalStateException
- If the archive builder is closed.org.entityfs.support.exception.WrappedIOException
- On I/O errors.ArchiveEntryAddException
- If the file cannot be added, for some
reason other than an I/O error.U add(InputStream is, org.entityfs.el.AbsoluteLocation entityLocation, V settings) throws IllegalStateException, org.entityfs.support.exception.WrappedIOException, ArchiveEntryAddException
is
- The stream to read file data from. The stream is not
closed by this method.entityLocation
- The location of the file entry in the archive.settings
- The custom settings to use for this entry. The custom
settings are combined with the default settings and global rule settings
as described above. If this is set to null
, only the default
settings combined with settings from the global rules that apply to this
file are used.this
.IllegalStateException
- If the archive builder is closed.org.entityfs.support.exception.WrappedIOException
- On I/O errors.ArchiveEntryAddException
- If the file cannot be added, for some
reason other than an I/O error.