|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.xbus.technical.file.FileBase
public abstract class FileBase
Class FileBase is the abstract base class for the
FileReceiverand FileSenderclasses.
It provides the methods for the copying, renaming and deleting physical files.
| Constructor Summary | |
|---|---|
FileBase()
|
|
| Method Summary | |
|---|---|
protected void |
copyFile(java.lang.String sourceFile,
java.lang.String targetFile)
Copies data by opening FileInput/OutputStreams from the one file to another denoted by these abstract pathnames |
protected void |
deleteFile(java.lang.String srcFilename)
Deletes the file or directory denoted by this abstract pathname. |
static java.lang.String |
getEncoding(java.lang.String system)
Reads the file encoding for the given system name from the Configuration. |
protected long |
getFileLength(java.lang.String filename)
|
protected int |
getLastByteOfFile(java.lang.String filename)
|
protected void |
renameFile(java.lang.String srcFilename,
java.lang.String destFilename)
Renames one file to another denoted by these abstract pathnames. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileBase()
| Method Detail |
|---|
public static java.lang.String getEncoding(java.lang.String system)
throws XException
Configuration. If this one is
non-existent, returns default value from the system property.
system - name which encoding must be read
XException - if any error occurs.
protected void renameFile(java.lang.String srcFilename,
java.lang.String destFilename)
throws XException
srcFilename - abstract pathname for the file to be renameddestFilename - abstract pathname for the named file
XException - if any error occurs
protected void copyFile(java.lang.String sourceFile,
java.lang.String targetFile)
throws XException
sourceFile - abstract pathname of the source filetargetFile - abstract pathname of the target file
XException - if any error occurs
protected void deleteFile(java.lang.String srcFilename)
throws XException
srcFilename - the name of the file to be deleted
XException - if something goes wrongprotected long getFileLength(java.lang.String filename)
filename - name of the file
protected int getLastByteOfFile(java.lang.String filename)
throws XException
filename - name of the file
XException - if something goes wrong
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||