|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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>>
This interface extends the 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.
Method Summary | |
---|---|
U |
add(InputStream is,
AbsoluteLocation entityLocation)
Add a file entry containing all data that can be read from the supplied stream. |
U |
add(InputStream is,
AbsoluteLocation entityLocation,
V settings)
Add a file entry containing all data that can be read from the supplied stream. |
Methods inherited from interface org.at4j.archive.builder.ArchiveBuilder |
---|
add, add, add, add, add, add, add, add, add, addRecursively, addRecursively, addRecursively, addRecursively, addRecursively, addRule, addRules, close, getDefaultDirectoryEntrySettings, getDefaultFileEntrySettings, getRules, isClosed, removeRule, setDefaultDirectoryEntrySettings, setDefaultFileEntrySettings |
Method Detail |
---|
U add(InputStream is, AbsoluteLocation entityLocation) throws IllegalStateException, 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.
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, AbsoluteLocation entityLocation, V settings) throws IllegalStateException, 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.
WrappedIOException
- On I/O errors.
ArchiveEntryAddException
- If the file cannot be added, for some
reason other than an I/O error.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |