Class S3ASource

java.lang.Object
org.gorpipe.driver.S3ASource
All Implemented Interfaces:
AutoCloseable, org.gorpipe.gor.driver.DataSource, org.gorpipe.gor.driver.providers.stream.sources.StreamSource

public class S3ASource extends Object implements org.gorpipe.gor.driver.providers.stream.sources.StreamSource
Represents an object in Amazon S3. Created by villi on 22/08/15.
  • Constructor Summary

    Constructors
    Constructor
    Description
    S3ASource(org.gorpipe.gor.driver.meta.SourceReference sourceReference)
    Create source
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    boolean
     
    org.gorpipe.gor.driver.meta.DataType
     
     
    getOutputStream(boolean append)
     
    org.gorpipe.gor.driver.providers.stream.sources.StreamSourceMetadata
     
    org.gorpipe.gor.driver.meta.SourceReference
     
    org.gorpipe.gor.driver.meta.SourceType
     
    boolean
     
     
    open(long start)
     
    open(long start, long minLength)
     
    boolean
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.gorpipe.gor.driver.DataSource

    createDirectories, createDirectory, createDirectoryIfNotExists, delete, fileExists, forceLink, getAccessValidationPath, getFullPath, getPath, getProjectLinkFile, getProjectLinkFileContent, list, move, supportsLinks, useIndex, walk

    Methods inherited from interface org.gorpipe.gor.driver.providers.stream.sources.StreamSource

    copy, getOutputStream, getOutputStream, openClosable
  • Constructor Details

    • S3ASource

      public S3ASource(org.gorpipe.gor.driver.meta.SourceReference sourceReference)
      Create source
      Parameters:
      sourceReference - contains S3 url of the form s3://bucket/objectpath
  • Method Details

    • open

      public InputStream open() throws IOException
      Specified by:
      open in interface org.gorpipe.gor.driver.providers.stream.sources.StreamSource
      Throws:
      IOException
    • open

      public InputStream open(long start) throws IOException
      Specified by:
      open in interface org.gorpipe.gor.driver.providers.stream.sources.StreamSource
      Throws:
      IOException
    • open

      public InputStream open(long start, long minLength) throws IOException
      Specified by:
      open in interface org.gorpipe.gor.driver.providers.stream.sources.StreamSource
      Throws:
      IOException
    • getName

      public String getName()
      Specified by:
      getName in interface org.gorpipe.gor.driver.DataSource
    • getSourceMetadata

      public org.gorpipe.gor.driver.providers.stream.sources.StreamSourceMetadata getSourceMetadata() throws IOException
      Specified by:
      getSourceMetadata in interface org.gorpipe.gor.driver.DataSource
      Specified by:
      getSourceMetadata in interface org.gorpipe.gor.driver.providers.stream.sources.StreamSource
      Throws:
      IOException
    • getOutputStream

      public OutputStream getOutputStream(boolean append) throws IOException
      Specified by:
      getOutputStream in interface org.gorpipe.gor.driver.providers.stream.sources.StreamSource
      Throws:
      IOException
    • supportsWriting

      public boolean supportsWriting()
      Specified by:
      supportsWriting in interface org.gorpipe.gor.driver.DataSource
    • getSourceReference

      public org.gorpipe.gor.driver.meta.SourceReference getSourceReference()
      Specified by:
      getSourceReference in interface org.gorpipe.gor.driver.DataSource
    • getDataType

      public org.gorpipe.gor.driver.meta.DataType getDataType()
      Specified by:
      getDataType in interface org.gorpipe.gor.driver.DataSource
    • exists

      public boolean exists()
      Specified by:
      exists in interface org.gorpipe.gor.driver.DataSource
    • isDirectory

      public boolean isDirectory()
      Specified by:
      isDirectory in interface org.gorpipe.gor.driver.DataSource
    • getSourceType

      public org.gorpipe.gor.driver.meta.SourceType getSourceType()
      Specified by:
      getSourceType in interface org.gorpipe.gor.driver.DataSource
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface org.gorpipe.gor.driver.DataSource
      Throws:
      IOException