public class FileImportInputStream extends ImportInputStream
ImportInputStream
class which
reads from a file on the BASE file system.Modifier and Type | Field and Description |
---|---|
private String |
charset |
private File |
file |
in
Constructor and Description |
---|
FileImportInputStream(File file,
long offset,
String charset)
Create a new import stream that reads data from
a file in the BASE filesystem.
|
Modifier and Type | Method and Description |
---|---|
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() . |
available, close, mark, markSupported, read, read, read, reset, skip
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()
.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