|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.InputStream java.io.FilterInputStream net.sf.basedb.core.plugin.ImportInputStream net.sf.basedb.util.FileImportInputStream
public class FileImportInputStream
An extension to the ImportInputStream
class which
reads from a file on the BASE file system.
Field Summary | |
---|---|
private String |
charset
|
private File |
file
|
Fields inherited from class java.io.FilterInputStream |
---|
in |
Constructor Summary | |
---|---|
FileImportInputStream(File file,
long offset,
String charset)
Create a new import stream that reads data from a file in the BASE filesystem. |
Method Summary | |
---|---|
String |
getCharacterSet()
Calls File.getCharacterSet() , unless a character set
was specified in the constructor. |
String |
getFilename()
Calls CommonItem.getName() . |
long |
getLength()
Calls File.getSize() to get the file size. |
String |
getMimeType()
Calls File.getMimeType() . |
Methods inherited from class java.io.FilterInputStream |
---|
available, close, mark, markSupported, read, read, read, reset, skip |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final File file
private final String charset
Constructor Detail |
---|
public FileImportInputStream(File file, long offset, String charset)
file
- The file to read fromoffset
- The offset (in bytes) to start reading fromcharset
- The character set to use when reading the file,
or null to use File.getCharacterSet()
.Method Detail |
---|
public long getLength()
File.getSize()
to get the file size.
getLength
in class ImportInputStream
public String getMimeType()
File.getMimeType()
.
getMimeType
in class ImportInputStream
public String getCharacterSet()
File.getCharacterSet()
, unless a character set
was specified in the constructor.
getCharacterSet
in class ImportInputStream
Charset.forName(String)
public String getFilename()
CommonItem.getName()
.
getFilename
in class ImportInputStream
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |