OpenMS
Loading...
Searching...
No Matches
S3InputSource.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Maintainer: Timo Sachsenberg $
6// $Authors: Julianus Pfeuffer, Timo Sachsenberg $
7// --------------------------------------------------------------------------
8
9#pragma once
10
13#include <OpenMS/config.h>
14
15#include <memory>
16#include <string>
17
18namespace OpenMS
19{
35 class OPENMS_DLLAPI S3InputSource
36 {
37public:
46 explicit S3InputSource(const std::string& uri);
47
49
57 std::unique_ptr<InputStream> makeStream() const;
58
60 static bool isS3URI(const std::string& uri);
61
63 static bool isAvailable();
64
70 static Int64 objectSize(const std::string& uri);
71
78 static std::string readRange(const std::string& uri, Int64 offset, Int64 length);
79
80 S3InputSource(const S3InputSource&) = delete;
82
83private:
84 struct Impl;
85 std::unique_ptr<Impl> impl_;
86 };
87
88} // namespace OpenMS
Source for reading XML files from Amazon S3 (s3://bucket/key), with Arrow's S3 filesystem.
Definition S3InputSource.h:36
static bool isS3URI(const std::string &uri)
Whether uri is an S3 URI (starts with "s3://")
static std::string readRange(const std::string &uri, Int64 offset, Int64 length)
The bytes [offset, offset + length) of the S3 object uri (fewer at its end).
S3InputSource & operator=(const S3InputSource &)=delete
std::unique_ptr< InputStream > makeStream() const
A stream of the (decompressed) content of the object, for the parser.
S3InputSource(const std::string &uri)
Opens the S3 object uri.
std::unique_ptr< Impl > impl_
The opened object (Arrow types stay out of this header)
Definition S3InputSource.h:85
static bool isAvailable()
Whether OpenMS can read S3 URIs: it was built with an Arrow library that has S3 support.
S3InputSource(const S3InputSource &)=delete
static Int64 objectSize(const std::string &uri)
The size of the S3 object uri, in bytes.
int64_t Int64
Signed integer type (64bit)
Definition Types.h:40
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19