Package net.sf.basedb.util.importer
Class BaseFileWrapper
java.lang.Object
net.sf.basedb.util.importer.BaseFileWrapper
- All Implemented Interfaces:
FileWrapper
public class BaseFileWrapper extends Object implements FileWrapper
File wrapper implementation for files that are located on the BASE file system.
- Since:
- 2.16
- Author:
- Nicklas
- Last modified
- $Date: 2010-08-03 11:21:30 +0200 (ti, 03 aug 2010) $
-
Field Summary
-
Constructor Summary
Constructors Constructor Description BaseFileWrapper(File file)
-
Method Summary
Modifier and Type Method Description String
getCharacterSet()
Get the character set used in the file.InputStream
getInputStream()
Get an input stream that reads data from the file.String
getName()
Get the name of the file.long
getSize()
Get the size of the file.
-
Field Details
-
file
-
-
Constructor Details
-
BaseFileWrapper
-
-
Method Details
-
getCharacterSet
Description copied from interface:FileWrapper
Get the character set used in the file.- Specified by:
getCharacterSet
in interfaceFileWrapper
- Returns:
- The character set, or null if not known or if the file is binary file
-
getInputStream
Description copied from interface:FileWrapper
Get an input stream that reads data from the file. Multiple calls to this method should normally result in multiple independent streams.- Specified by:
getInputStream
in interfaceFileWrapper
- Returns:
- An input stream
- Throws:
IOException
-
getName
Description copied from interface:FileWrapper
Get the name of the file.- Specified by:
getName
in interfaceFileWrapper
- Returns:
- The name of the file, or null if not known
-
getSize
public long getSize()Description copied from interface:FileWrapper
Get the size of the file.- Specified by:
getSize
in interfaceFileWrapper
- Returns:
- The size of the file, or -1 if not known
-