P
P
pinegink12020-07-17 19:04:03
Java
pinegink1, 2020-07-17 19:04:03

How to copy/buffer an infinite InputStream?

There is an InputStream and data is endlessly fed into it. It is necessary to distribute this data to many OutputStreams

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Roo, 2020-07-17
@xez

InputStream has a read(byte[] b) method: you read the required number of bytes with it.
Then you decompose this array of bytes into outputStreams in any amount.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question