|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.lang.ClassLoader
|
+--VASSAL.tools.DataArchive
|
+--VASSAL.tools.ArchiveWriter
An ArchiveWriter is a writeable DataArchive. New files may be added with the addFile(java.lang.String, java.lang.String) and addImage(java.lang.String, java.lang.String) methods.
| Field Summary |
| Fields inherited from class VASSAL.tools.DataArchive |
archive, extensions, IMAGE_DIR, imageNames |
| Constructor Summary | |
ArchiveWriter(java.lang.String zipName)
Create a new writeable archive. |
|
| Method Summary | |
void |
addFile(java.lang.String name,
java.io.InputStream stream)
Copy an InputStream into the archive |
void |
addFile(java.lang.String path,
java.lang.String name)
Copy a file from the user's filesystem to the archive. |
void |
addImage(java.lang.String path,
java.lang.String name)
Add an image file to the archive. |
java.io.InputStream |
getFileStream(java.lang.String name)
Overrides DataArchive.getFileStream(java.io.File, java.lang.String) to return streams
that have been added to the archive but not yet written to disk. |
protected void |
listImageNames(java.util.Vector v)
Place the names of the image files stored in this DataArchive into the argument Vector |
void |
saveAs()
|
void |
write()
If the ArchiveWriter was initialized with non-null file name, then write the contents of the archive to the named archive. |
| Methods inherited from class VASSAL.tools.DataArchive |
addExtension, findClass, findImage, findImage, getArchive, getBytes, getCachedImage, getFileStream, getFileStream, getImage, getImageNames, getName, getURL, getWriter, isNameCacheStale, loadClass, unCacheImage |
| Methods inherited from class java.lang.ClassLoader |
clearAssertionStatus, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ArchiveWriter(java.lang.String zipName)
zipName - the name of the archive. If null, the user will
be prompted for a filename when saving. If not null, new
entries will be added to the named archive.| Method Detail |
public void addImage(java.lang.String path,
java.lang.String name)
path - the full path of the image file on the user's filesystemname - the name under which to store the image in the archive
public void addFile(java.lang.String path,
java.lang.String name)
path - the full path of the file on the user's filesystemname - the name under which to store the file in the archive
public void addFile(java.lang.String name,
java.io.InputStream stream)
name - the name under which to store the contents of the streamstream - the stream to copy
public java.io.InputStream getFileStream(java.lang.String name)
throws java.io.IOException
DataArchive.getFileStream(java.io.File, java.lang.String) to return streams
that have been added to the archive but not yet written to disk.
getFileStream in class DataArchivejava.io.IOException
public void saveAs()
throws java.io.IOException
java.io.IOException
public void write()
throws java.io.IOException
java.io.IOExceptionprotected void listImageNames(java.util.Vector v)
DataArchive
listImageNames in class DataArchivev -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||