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 long
getCreationTime()
The creation time in UTC millisecondslong
getLastModified()
The last modified time in UTC millisecondsString
getName()
Get the file namelong
getSize()
The size in bytes.InputStream
openInputStream(boolean b)
Open a stream for readingOutputStream
openOutputStream(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:VirtualFile
Get the file name- Specified by:
getName
in interfaceVirtualFile
-
openInputStream
public InputStream openInputStream(boolean b) throws IOException
Description copied from interface:VirtualFile
Open a stream for reading- Specified by:
openInputStream
in 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:VirtualFile
Open a stream for writing- Specified by:
openOutputStream
in 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:VirtualFile
The last modified time in UTC milliseconds- Specified by:
getLastModified
in interfaceVirtualFile
-
getCreationTime
public long getCreationTime()
Description copied from interface:VirtualFile
The creation time in UTC milliseconds- Specified by:
getCreationTime
in interfaceVirtualFile
-
getSize
public long getSize()
Description copied from interface:VirtualFile
The size in bytes.- Specified by:
getSize
in interfaceVirtualFile
- Returns:
- the size or -1 if unknown.
-
-