-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from connexta/STOR-1
STOR-1 Fix S3 Provider to read files directly from S3
- Loading branch information
Showing
7 changed files
with
179 additions
and
192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
s3/src/main/java/com/connexta/ddf/catalog/content/impl/S3ObjectByteSource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.connexta.ddf.catalog.content.impl; | ||
|
||
import com.amazonaws.services.s3.model.S3Object; | ||
import com.google.common.io.ByteSource; | ||
import java.io.IOException; | ||
import java.io.InputStream; | ||
|
||
public class S3ObjectByteSource extends ByteSource { | ||
|
||
private S3Object s3Object; | ||
|
||
public S3ObjectByteSource(S3Object s3Object) { | ||
this.s3Object = s3Object; | ||
} | ||
|
||
@Override | ||
public InputStream openStream() throws IOException { | ||
return s3Object.getObjectContent(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.