Package org.teiid.common.buffer
Class FileStoreInputStreamFactory
- java.lang.Object
-
- org.teiid.core.types.InputStreamFactory
-
- org.teiid.common.buffer.FileStoreInputStreamFactory
-
- All Implemented Interfaces:
Source
public final class FileStoreInputStreamFactory extends InputStreamFactory
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.teiid.core.types.InputStreamFactory
InputStreamFactory.BlobInputStreamFactory, InputStreamFactory.ClobInputStreamFactory, InputStreamFactory.FileInputStreamFactory, InputStreamFactory.SQLXMLInputStreamFactory, InputStreamFactory.StorageMode, InputStreamFactory.StreamFactoryReference
-
-
Field Summary
-
Fields inherited from class org.teiid.core.types.InputStreamFactory
length
-
-
Constructor Summary
Constructors Constructor Description FileStoreInputStreamFactory(FileStore lobBuffer, String encoding)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
free()
Reader
getCharacterStream()
InputStream
getInputStream()
Get a new InputStreamInputStream
getInputStream(long start, long len)
long
getLength()
Length in bytes of theInputStream
byte[]
getMemoryBytes()
FileStore.FileStoreOutputStream
getOuputStream()
The returned output stream is shared among all uses.FileStore.FileStoreOutputStream
getOuputStream(int maxMemorySize)
The returned output stream is shared among all uses.InputStreamFactory.StorageMode
getStorageMode()
Writer
getWriter()
Returns a new writer instance that is backed by the shared output stream.boolean
isTemporary()
void
setTemporary(boolean b)
-
Methods inherited from class org.teiid.core.types.InputStreamFactory
getStorageMode, getSystemId, setLength, setSystemId, setTemporary
-
-
-
-
Method Detail
-
getInputStream
public InputStream getInputStream()
Description copied from class:InputStreamFactory
Get a new InputStream- Specified by:
getInputStream
in classInputStreamFactory
-
getInputStream
public InputStream getInputStream(long start, long len)
-
getMemoryBytes
public byte[] getMemoryBytes()
-
getCharacterStream
public Reader getCharacterStream() throws IOException
- Overrides:
getCharacterStream
in classInputStreamFactory
- Throws:
IOException
-
getLength
public long getLength()
Description copied from class:InputStreamFactory
Length in bytes of theInputStream
- Overrides:
getLength
in classInputStreamFactory
- Returns:
- the length or -1 if the length is not known
-
getWriter
public Writer getWriter()
Returns a new writer instance that is backed by the shared output stream. Closing a writer will prevent further writes.- Returns:
-
getOuputStream
public FileStore.FileStoreOutputStream getOuputStream()
The returned output stream is shared among all uses. Once closed no further writing can occur- Returns:
-
getOuputStream
public FileStore.FileStoreOutputStream getOuputStream(int maxMemorySize)
The returned output stream is shared among all uses. Once closed no further writing can occur- Returns:
-
free
public void free()
- Overrides:
free
in classInputStreamFactory
-
getStorageMode
public InputStreamFactory.StorageMode getStorageMode()
- Overrides:
getStorageMode
in classInputStreamFactory
-
isTemporary
public boolean isTemporary()
-
setTemporary
public void setTemporary(boolean b)
- Overrides:
setTemporary
in classInputStreamFactory
-
-