title: How to create an Observable sequence of bytes from an input stream in RxJava
body: <p>I am new to RxJava, hence, asking this question. I have an input stream which I have to convert to a sequence of byte arrays of specific size. Something like:</p>
  
  <pre><code>Observable
    .just(inputStream)
    .map(new Func1&lt;InputStream, Chunk&gt;());
  </code></pre>
  
  <p>Here <code>Chunk</code> is a custom class which contains the number of bytes read from the stream. Could someone help me understand how to do this in RxJava</p>