Package org.jbundle.jbackup.source
Class BaseSourceFile
- java.lang.Object
-
- org.jbundle.jbackup.source.BaseSourceFile
-
- All Implemented Interfaces:
SourceFile
- Direct Known Subclasses:
StreamSourceFile,ZipSourceFile
public class BaseSourceFile extends Object implements SourceFile
Directory scanner. This class is a utility for scanning through a directory tree.- Version:
- Author:
- Administrator
-
-
Field Summary
Fields Modifier and Type Field Description Stringm_FileNameStringm_FilePathFilem_inputFileInputStreamm_InputStreamlongm_lStreamLength
-
Constructor Summary
Constructors Constructor Description BaseSourceFile()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close the source file.FilegetFile()StringgetFileName()StringgetFilePath()InputStreamgetInputStream()longgetStreamLength()voidinit(File inputFile, InputStream inputStream, String filePath, String fileName, long lStreamLength)FilemakeInFile()FilemakeInFile(boolean bAllowFilenameChange)InputStreammakeInStream()If there is no input stream, use the file to create one.
-
-
-
Field Detail
-
m_inputFile
public File m_inputFile
-
m_InputStream
public InputStream m_InputStream
-
m_FilePath
public String m_FilePath
-
m_FileName
public String m_FileName
-
m_lStreamLength
public long m_lStreamLength
-
-
Method Detail
-
init
public void init(File inputFile, InputStream inputStream, String filePath, String fileName, long lStreamLength)
-
getInputStream
public InputStream getInputStream()
- Specified by:
getInputStreamin interfaceSourceFile
-
getFilePath
public String getFilePath()
- Specified by:
getFilePathin interfaceSourceFile
-
getFileName
public String getFileName()
- Specified by:
getFileNamein interfaceSourceFile
-
getStreamLength
public long getStreamLength()
- Specified by:
getStreamLengthin interfaceSourceFile
-
getFile
public File getFile()
- Specified by:
getFilein interfaceSourceFile
-
close
public void close()
Close the source file.- Specified by:
closein interfaceSourceFile
-
makeInStream
public InputStream makeInStream()
If there is no input stream, use the file to create one.- Specified by:
makeInStreamin interfaceSourceFile
-
makeInFile
public File makeInFile()
- Specified by:
makeInFilein interfaceSourceFile
-
makeInFile
public File makeInFile(boolean bAllowFilenameChange)
- Specified by:
makeInFilein interfaceSourceFile
-
-