title: RxJava Cannot get value in map
body: <p>I'm facing a problem when reading list of observables from ftp server.Here is my code:</p>
  
  <pre><code>public RxJavaProcessor&lt;byte[], String&gt; processor() {
          /*
           * return inputStream -&gt; inputStream.map(data -&gt; { logger.info("Got data = " +
           * data); return data; }).buffer(10, 10, TimeUnit.SECONDS).map(data -&gt;
           * processData(data));
           */
  
          return inputStream -&gt; inputStream.map(data -&gt; {
              logger.info("Got data = " + data);
              return data;
          }).buffer(10, 10, TimeUnit.SECONDS).collect(ByteArrayOutputStream::new, (bout, bytes) -&gt; {
              bytes.forEach(byteItem -&gt; {
                  bout.write(byteItem, 0, byteItem.length);
              });
          }).map(bout -&gt; {
              byte[] byteArray = bout.toByteArray();
              try {
                  logger.info("byte array to string: " + new String(byteArray, "UTF-8"));
              } catch (UnsupportedEncodingException e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
              }
              return byteArray;
          }).map(data -&gt; processData(data));
      }
  </code></pre>
  
  <p>If I put in log the byte array inside <strong>collect</strong> operator like this:</p>
  
  <p><strong><em>logger.info("byte array to string: " + new String(byteItem, "UTF-8"))</em></strong>. I see the result which is an input xml. But when I write in log inside <strong>map</strong> like shown in the piece of code above
  <strong>logger.info("byte array to string: " + new String(byteArray, "UTF-8"))</strong>
  .I don't see any result, so what is the problem ?</p>
  
  <p>Thanks in advance for your help.</p>