Short answer: I think it depends on what you want to use it with? I don't know of a good way to figure this out in general, I think I tend to just search the source code. I include some info below, but tl;dr my recommendation is something like BufferReader[1].
Long answer: In general, you pasted a list of classes that derive from InputStream (I modified for readability): Subclassed by io::RandomAccessFile io::StdinStream io::TransformInputStream io::SlowInputStreamBase< InputStream > io::internal::InputStreamConcurrencyWrapper< Derived > io::internal::InputStreamConcurrencyWrapper< BufferedInputStream > io::internal::InputStreamConcurrencyWrapper< CompressedInputStream > I wouldn't recommend using anything in the `internal` namespace directly. I don't remember how I came across it, but what I've used in the past is BufferReader[1]. The class lineage is: BufferReader --> RandomAccessFileConcurrencyWrapper --> RandomAccessFile --> InputStream Notice that RandomAccessFile is mentioned in the list of classes that derive from InputStream, but BufferReader isn't (because it's further down the chain). Looking at it again, I guess you can just walk down from the subclass list, e.g. RandomAccessFile [2] also lists its direct subclasses. [1]: https://arrow.apache.org/docs/cpp/api/io.html#_CPPv4N5arrow2io12BufferReaderE [2]: https://arrow.apache.org/docs/cpp/api/io.html#_CPPv4N5arrow2io16RandomAccessFileE # ------------------------------ # Aldrin https://github.com/drin/ https://gitlab.com/octalene Sent with Proton Mail secure email. ------- Original Message ------- On Friday, May 5th, 2023 at 12:36, Arkadiy Vertleyb (BLOOMBERG/ 120 PARK) <[email protected]> wrote: > Hi, > Can anyone clarify how to create an InputStream from the memory biffer in > C++? Which subclass should I use? > > Looking at this, can't figure out: > > class InputStream : public virtual arrow::io::FileInterface, public virtual > arrow::io::Readable, public std::enable_shared_from_this<InputStream> > Subclassed by arrow::io::internal::InputStreamConcurrencyWrapper< Derived >, > arrow::io::RandomAccessFile, arrow::io::StdinStream, > arrow::io::TransformInputStream, > arrow::io::internal::InputStreamConcurrencyWrapper< BufferedInputStream >, > arrow::io::internal::InputStreamConcurrencyWrapper< CompressedInputStream >, > arrow::io::SlowInputStreamBase< InputStream > > > Thanks, > Arkadiy
publickey - [email protected] - 0x21969656.asc
Description: application/pgp-keys
signature.asc
Description: OpenPGP digital signature
