public class ImportInputStream extends FilterInputStream
InputStream
but provides methods for accessing
metadata about the original source the stream is originating from.
This class is intended to be subclassed by implementations more
suitable for the type of import. For example the
FileImportInputStream
for importing from
files on the BASE file system.
in
Constructor and Description |
---|
ImportInputStream(InputStream in)
Create a new import stream.
|
Modifier and Type | Method and Description |
---|---|
String |
getCharacterSet()
Get the character set used by the source if it is a text-file.
|
String |
getFilename()
Get the name of the source.
|
long |
getLength()
Get the length of the stream in number of bytes.
|
String |
getMimeType()
Get the MIME type of the source.
|
available, close, mark, markSupported, read, read, read, reset, skip
public ImportInputStream(InputStream in)
in
- The source stream to read frompublic long getLength()
public String getMimeType()
public String getCharacterSet()
Charset.forName(String)
public String getFilename()