public class ImportInputStream
extends java.io.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.
Constructor and Description |
---|
ImportInputStream(java.io.InputStream in)
Create a new import stream.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCharacterSet()
Get the character set used by the source if it is a text-file.
|
java.lang.String |
getFilename()
Get the name of the source.
|
long |
getLength()
Get the length of the stream in number of bytes.
|
java.lang.String |
getMimeType()
Get the MIME type of the source.
|
public ImportInputStream(java.io.InputStream in)
in
- The source stream to read frompublic long getLength()
public java.lang.String getMimeType()
public java.lang.String getCharacterSet()
Charset.forName(String)
public java.lang.String getFilename()