Package org.teiid.file
Interface VirtualFile
-
- All Known Implementing Classes:
JavaVirtualFile
public interface VirtualFile
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default InputStreamFactorycreateInputStreamFactory()TheInputStreamFactoryfor utilizing this file as a blob or clob in the engine.longgetCreationTime()The creation time in UTC millisecondslonggetLastModified()The last modified time in UTC millisecondsStringgetName()Get the file namelonggetSize()The size in bytes.default InputStreamFactory.StorageModegetStorageMode()Get theInputStreamFactory.StorageModeof this file.InputStreamopenInputStream(boolean lock)Open a stream for readingOutputStreamopenOutputStream(boolean lock)Open a stream for writing
-
-
-
Method Detail
-
getName
String getName()
Get the file name
-
createInputStreamFactory
default InputStreamFactory createInputStreamFactory()
TheInputStreamFactoryfor utilizing this file as a blob or clob in the engine.
-
getStorageMode
default InputStreamFactory.StorageMode getStorageMode()
Get theInputStreamFactory.StorageModeof this file. Used bycreateInputStreamFactory(). Defaults to OTHER (not local on disk nor memory).- Returns:
-
openInputStream
InputStream openInputStream(boolean lock) throws IOException
Open a stream for reading- Parameters:
lock- true if a lock is requested. It's up to the implementation whether to actually honor the lock.- Throws:
IOException
-
openOutputStream
OutputStream openOutputStream(boolean lock) throws IOException
Open a stream for writing- Parameters:
lock- true if a lock is requested. It's up to the implementation whether to actually honor the lock.- Throws:
IOException
-
getLastModified
long getLastModified()
The last modified time in UTC milliseconds
-
getCreationTime
long getCreationTime()
The creation time in UTC milliseconds
-
getSize
long getSize()
The size in bytes.- Returns:
- the size or -1 if unknown.
-
-