|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.entityfs.util.zip.EntityIteratorToZipEntryInfoIteratorAdapter
public class EntityIteratorToZipEntryInfoIteratorAdapter
This is an adapter between an EntityView
Iterator
and the
ZipEntryInfo
Iterator
needed by ZipCreator
for Zip
files where all entry names should be constructed relative to one directory
name.
This is used when creating Zip files with files from one source directory hierarchy.
CompoundZipEntryInfoProvider
Constructor Summary | |
---|---|
EntityIteratorToZipEntryInfoIteratorAdapter(DirectoryView baseDir,
Iterator<? extends EntityView> adapted)
Create an EntityIteratorToZipEntryInfoIteratorAdapter that will
create ZipEntryInfo objects with a location relative to the
supplied directory. |
|
EntityIteratorToZipEntryInfoIteratorAdapter(DirectoryView baseDir,
Iterator<? extends EntityView> adapted,
AbsoluteLocation baseLocation)
Create an EntityIteratorToZipEntryInfoIteratorAdapter that will
create ZipEntryInfo objects with a location relative to the
supplied relative location. |
|
EntityIteratorToZipEntryInfoIteratorAdapter(DirectoryView baseDir,
Iterator<? extends EntityView> adapted,
AbsoluteLocation baseLocation,
ZipEntryInfoProvider eip)
Create an EntityIteratorToZipEntryInfoIteratorAdapter that will
create ZipEntryInfo objects with a location relative to the
supplied relative location. |
|
EntityIteratorToZipEntryInfoIteratorAdapter(DirectoryView baseDir,
Iterator<? extends EntityView> adapted,
ZipEntryInfoProvider eip)
Create an EntityIteratorToZipEntryInfoIteratorAdapter that will
create ZipEntryInfo objects with a location relative to the
supplied directory. |
Method Summary | |
---|---|
protected ZipEntryInfo |
createZipEntryInfo(EntityView ev)
This can be overridden by subclasses to create other kinds of ZipEntryInfo objects. |
protected DirectoryView |
getBaseDir()
|
protected ZipEntryInfoProvider |
getExtraInfoProvider()
Get the provider class used to add extra information to ZipEntry
objects. |
boolean |
hasNext()
|
ZipEntryInfo |
next()
|
void |
remove()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EntityIteratorToZipEntryInfoIteratorAdapter(DirectoryView baseDir, Iterator<? extends EntityView> adapted)
EntityIteratorToZipEntryInfoIteratorAdapter
that will
create ZipEntryInfo
objects with a location relative to the
supplied directory.
baseDir
- The directory that ZipEntryInfo
locations will be
created relative to.adapted
- The iterator to adapt.public EntityIteratorToZipEntryInfoIteratorAdapter(DirectoryView baseDir, Iterator<? extends EntityView> adapted, AbsoluteLocation baseLocation)
EntityIteratorToZipEntryInfoIteratorAdapter
that will
create ZipEntryInfo
objects with a location relative to the
supplied relative location.
baseDir
- The directory that ZipEntryInfo
locations will be
created relative to.adapted
- The iterator to adapt.baseLocation
- The base path of the zip entries.public EntityIteratorToZipEntryInfoIteratorAdapter(DirectoryView baseDir, Iterator<? extends EntityView> adapted, ZipEntryInfoProvider eip)
EntityIteratorToZipEntryInfoIteratorAdapter
that will
create ZipEntryInfo
objects with a location relative to the
supplied directory.
baseDir
- The directory that ZipEntryInfo
locations will be
created relative to.adapted
- The iterator to adapt.eip
- A provider of extra ZipEntry
information.public EntityIteratorToZipEntryInfoIteratorAdapter(DirectoryView baseDir, Iterator<? extends EntityView> adapted, AbsoluteLocation baseLocation, ZipEntryInfoProvider eip)
EntityIteratorToZipEntryInfoIteratorAdapter
that will
create ZipEntryInfo
objects with a location relative to the
supplied relative location.
baseDir
- The directory that ZipEntryInfo
locations will be
created relative to.adapted
- The iterator to adapt.baseLocation
- The base path of the zip entries.eip
- A provider of extra ZipEntry
information.Method Detail |
---|
protected DirectoryView getBaseDir()
protected ZipEntryInfoProvider getExtraInfoProvider()
ZipEntry
objects.
null
if not set.protected ZipEntryInfo createZipEntryInfo(EntityView ev)
ZipEntryInfo
objects.
ev
- The entity to create the object for.
ZipEntryInfo
object for the entity. If this method
returns null
, the entry should not be included in the Zip file.public boolean hasNext()
hasNext
in interface Iterator<ZipEntryInfo>
public ZipEntryInfo next()
next
in interface Iterator<ZipEntryInfo>
public void remove()
remove
in interface Iterator<ZipEntryInfo>
UnsupportedOperationException
- Always.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |