|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.rej.files.FileSet net.sf.rej.files.Archive
public class Archive
Field Summary |
---|
Fields inherited from class net.sf.rej.files.FileSet |
---|
serialVersionUID |
Constructor Summary | |
---|---|
Archive(java.io.File f)
|
Method Summary | |
---|---|
void |
addFile(java.lang.String filename)
Mark file as to be added to archive. |
void |
close()
Close the FileSet. |
static Archive |
createNew(java.io.File file)
|
java.lang.String |
getClasspath(java.lang.String mainClass)
|
java.util.List<java.lang.String> |
getContentsList()
Get the contents of this file set, ie. the list of files that are included in this set. |
byte[] |
getData(java.lang.String file)
Get the contents of file belonging in this set, identified by file. |
java.io.InputStream |
getInputStream(java.lang.String file)
Get an InputStream to contents of a file in this set, identified by file. |
long |
getLength(java.lang.String file)
Get the length of the file in this set identified by file. |
java.lang.String |
getName()
Return the name of the set. |
void |
partialSave(java.lang.String filename,
byte[] data)
|
void |
refresh()
Refresh the FileSet, loading the contents from the filesystem |
void |
removeAllFiles()
|
void |
removeFile(java.lang.String filename)
Mark file as to-be-removed. |
void |
save(Modifications mods)
|
void |
saveAs(java.io.File file,
Modifications mods)
|
void |
write(java.lang.String filename,
byte[] data)
|
void |
write(java.lang.String filename,
java.io.InputStream is)
|
Methods inherited from class net.sf.rej.files.FileSet |
---|
equals, getChecksum, getContentsFrom, hashCode |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Archive(java.io.File f) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public java.util.List<java.lang.String> getContentsList()
FileSet
getContentsList
in class FileSet
public byte[] getData(java.lang.String file) throws java.io.IOException
FileSet
getData
in class FileSet
file
- String the file to get
java.io.IOException
- Some of the internal I/O caused an exceptionpublic java.lang.String getName()
FileSet
getName
in class FileSet
public java.io.InputStream getInputStream(java.lang.String file) throws java.io.IOException
FileSet
getInputStream
in class FileSet
file
- String the file to get
java.io.IOException
- Some of the internal I/O caused an exceptionpublic long getLength(java.lang.String file)
FileSet
getLength
in class FileSet
file
- String name of the file whose size is requested.
public void write(java.lang.String filename, byte[] data) throws java.io.IOException
java.io.IOException
public void write(java.lang.String filename, java.io.InputStream is) throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
FileSet
close
in class FileSet
java.io.IOException
- I/O problem closing the FileSetpublic void addFile(java.lang.String filename)
addFile
in class FileSet
filename
- Stringpublic void removeFile(java.lang.String filename)
removeFile
in class FileSet
filename
- Stringpublic void refresh() throws java.io.IOException
FileSet
refresh
in class FileSet
java.io.IOException
- I/O problem during refreshpublic void save(Modifications mods) throws java.io.IOException
save
in class FileSet
java.io.IOException
public void saveAs(java.io.File file, Modifications mods) throws java.io.IOException
saveAs
in class FileSet
java.io.IOException
public void partialSave(java.lang.String filename, byte[] data) throws java.io.IOException
java.io.IOException
public static Archive createNew(java.io.File file) throws java.io.IOException
java.io.IOException
public void removeAllFiles() throws java.io.IOException
removeAllFiles
in class FileSet
java.io.IOException
public java.lang.String getClasspath(java.lang.String mainClass)
getClasspath
in class FileSet
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |