|
||||||||||
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.SingleFile
public class SingleFile
Field Summary |
---|
Fields inherited from class net.sf.rej.files.FileSet |
---|
serialVersionUID |
Constructor Summary | |
---|---|
SingleFile(java.io.File f)
|
Method Summary | |
---|---|
void |
addFile(java.lang.String filename)
Add a file to the set. |
void |
close()
Call close for all FileInputStream objects returned by calls to getInputStream(String filename) |
static SingleFile |
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)
Remove file denoted by filename from the set. |
void |
save(Modifications ms)
|
void |
saveAs(java.io.File file,
Modifications ms)
|
void |
write(byte[] data)
|
void |
write(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 SingleFile(java.io.File f) throws java.io.FileNotFoundException
java.io.FileNotFoundException
Method Detail |
---|
public long getLength(java.lang.String file)
FileSet
getLength
in class FileSet
file
- String name of the file whose size is requested.
public java.io.InputStream getInputStream(java.lang.String file)
FileSet
getInputStream
in class FileSet
file
- String the file to get
public java.lang.String getName()
FileSet
getName
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.util.List<java.lang.String> getContentsList()
FileSet
getContentsList
in class FileSet
public void write(byte[] data) throws java.io.IOException
java.io.IOException
public void write(java.io.InputStream is) throws java.io.IOException
java.io.IOException
public void close()
close
in class FileSet
public void removeFile(java.lang.String filename)
FileSet
removeFile
in class FileSet
filename
- String file to removepublic void addFile(java.lang.String filename)
FileSet
addFile
in class FileSet
filename
- String file to addpublic void refresh()
FileSet
refresh
in class FileSet
public void save(Modifications ms) throws java.io.IOException
save
in class FileSet
java.io.IOException
public void saveAs(java.io.File file, Modifications ms) 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 void removeAllFiles()
removeAllFiles
in class FileSet
public static SingleFile createNew(java.io.File file) throws java.io.IOException
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 |