Class ListingRetriever


  • public class ListingRetriever
    extends Object
    This class retrieves the list of buckets or of objects inside a bucket.
    • Constructor Detail

      • ListingRetriever

        public ListingRetriever​(HttpClient httpClient)
        Create a new instance of ListingRetriever.
        Parameters:
        httpClient - HTTP client to access the BucketFS service
    • Method Detail

      • publicReadUri

        public static URI publicReadUri​(String protocol,
                                        String host,
                                        int port,
                                        String suffix)
        Parameters:
        protocol - protocol
        host - host name or IP address for the URI
        port - port
        suffix - e.g. name of the bucket
        Returns:
        URI made up from the specified elements
      • retrieve

        public Stream<String> retrieve​(URI uri,
                                       String readPassword)
                                throws BucketAccessException
        Retrieve the content for the given URI as stream.
        Parameters:
        uri - URI to retrieve listing for
        readPassword - read password, only relevant for non-public buckets
        Returns:
        stream of strings
        Throws:
        BucketAccessException - in case of failure