Package org.teiid.s3
Class S3VirtualFile
- java.lang.Object
-
- org.teiid.s3.S3VirtualFile
-
- All Implemented Interfaces:
VirtualFile
public class S3VirtualFile extends Object implements VirtualFile
-
-
Constructor Summary
Constructors Constructor Description S3VirtualFile(com.amazonaws.services.s3.AmazonS3 s3Client, com.amazonaws.services.s3.model.S3ObjectSummary s3ObjectSummary, S3Configuration s3Config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetCreationTime()The creation time in UTC millisecondslonggetLastModified()The last modified time in UTC millisecondsStringgetName()Get the file namelonggetSize()The size in bytes.InputStreamopenInputStream(boolean b)Open a stream for readingOutputStreamopenOutputStream(boolean b)Open a stream for writing-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.teiid.file.VirtualFile
createInputStreamFactory, getStorageMode
-
-
-
-
Constructor Detail
-
S3VirtualFile
public S3VirtualFile(com.amazonaws.services.s3.AmazonS3 s3Client, com.amazonaws.services.s3.model.S3ObjectSummary s3ObjectSummary, S3Configuration s3Config)
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:VirtualFileGet the file name- Specified by:
getNamein interfaceVirtualFile
-
openInputStream
public InputStream openInputStream(boolean b) throws IOException
Description copied from interface:VirtualFileOpen a stream for reading- Specified by:
openInputStreamin interfaceVirtualFile- Parameters:
b- true if a lock is requested. It's up to the implementation whether to actually honor the lock.- Throws:
IOException
-
openOutputStream
public OutputStream openOutputStream(boolean b) throws IOException
Description copied from interface:VirtualFileOpen a stream for writing- Specified by:
openOutputStreamin interfaceVirtualFile- Parameters:
b- true if a lock is requested. It's up to the implementation whether to actually honor the lock.- Throws:
IOException
-
getLastModified
public long getLastModified()
Description copied from interface:VirtualFileThe last modified time in UTC milliseconds- Specified by:
getLastModifiedin interfaceVirtualFile
-
getCreationTime
public long getCreationTime()
Description copied from interface:VirtualFileThe creation time in UTC milliseconds- Specified by:
getCreationTimein interfaceVirtualFile
-
getSize
public long getSize()
Description copied from interface:VirtualFileThe size in bytes.- Specified by:
getSizein interfaceVirtualFile- Returns:
- the size or -1 if unknown.
-
-