<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: [resolved] Binary File as Input in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-Binary-File-as-Input/m-p/2351481#M118123</link>
    <description>I think I've got the solution. 
&lt;BR /&gt;[list=1] 
&lt;BR /&gt; 
&lt;LI&gt;tJava: create an ArrayList&lt;/LI&gt; 
&lt;BR /&gt; 
&lt;LI&gt;tJava: loops over the binary file and put elements into the ArrayList&lt;/LI&gt; 
&lt;BR /&gt; 
&lt;LI&gt;tJava: at the end of the loop, put the ArrayList into the global Map&lt;/LI&gt; 
&lt;BR /&gt;Later: 
&lt;BR /&gt;tJavaFlex / Start Code: 
&lt;BR /&gt; 
&lt;PRE&gt;java.util.Iterator&amp;lt;Tick&amp;gt; al = ((java.util.ArrayList&amp;lt;Tick&amp;gt;)globalMap.get("ticks")).iterator();&lt;BR /&gt;&lt;BR /&gt;while (al.hasNext()) {&lt;/PRE&gt; 
&lt;BR /&gt;tJavaFlex / Main Code: 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;PRE&gt;Tick ti = al.next();&lt;BR /&gt;row2.milliseconds = ti.getMilliseconds();&lt;BR /&gt;row2.ask = ti.getAsk();&lt;BR /&gt;row2.bid = ti.getBid();&lt;BR /&gt;row2.askv = ti.getAskv();&lt;BR /&gt;row2.bidv = ti.getBidv();&lt;BR /&gt;&lt;/PRE&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;tJavaFlex / End Code: 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;PRE&gt;}&lt;/PRE&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;And that creates the flow. I think the memory usage peaks a little, but the files are not longer than 1-2MB, so that shouldn't be too much of an issue. Very cool, this brings me a huge leap forward. Thank you Talend!!</description>
    <pubDate>Sun, 02 Oct 2016 00:06:45 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-10-02T00:06:45Z</dc:date>
    <item>
      <title>[resolved] Binary File as Input</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Binary-File-as-Input/m-p/2351480#M118122</link>
      <description>&lt;P&gt;Hi, from what I've read in other forum entries, it's not possible to use binary files as an input. I DO know the exact data structure and I have a little plain Java source snippet which is capable extracting the data from the binary file. &lt;BR /&gt;&lt;BR /&gt;Is there any way I can use that little Java snippet as a generator for an input, just like the tFileInput..... components are? &lt;BR /&gt;In an ideal world, I would fill the output_row fields within each iteration of my Java loop, just like that:&lt;/P&gt;
&lt;PRE&gt;output_row.field1 = field1;&lt;BR /&gt;output_row.field2 = field2;&lt;BR /&gt;...&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;Any advise would be appreciated.&lt;/P&gt;</description>
      <pubDate>Sat, 01 Oct 2016 20:16:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Binary-File-as-Input/m-p/2351480#M118122</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-01T20:16:20Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Binary File as Input</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Binary-File-as-Input/m-p/2351481#M118123</link>
      <description>I think I've got the solution. 
&lt;BR /&gt;[list=1] 
&lt;BR /&gt; 
&lt;LI&gt;tJava: create an ArrayList&lt;/LI&gt; 
&lt;BR /&gt; 
&lt;LI&gt;tJava: loops over the binary file and put elements into the ArrayList&lt;/LI&gt; 
&lt;BR /&gt; 
&lt;LI&gt;tJava: at the end of the loop, put the ArrayList into the global Map&lt;/LI&gt; 
&lt;BR /&gt;Later: 
&lt;BR /&gt;tJavaFlex / Start Code: 
&lt;BR /&gt; 
&lt;PRE&gt;java.util.Iterator&amp;lt;Tick&amp;gt; al = ((java.util.ArrayList&amp;lt;Tick&amp;gt;)globalMap.get("ticks")).iterator();&lt;BR /&gt;&lt;BR /&gt;while (al.hasNext()) {&lt;/PRE&gt; 
&lt;BR /&gt;tJavaFlex / Main Code: 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;PRE&gt;Tick ti = al.next();&lt;BR /&gt;row2.milliseconds = ti.getMilliseconds();&lt;BR /&gt;row2.ask = ti.getAsk();&lt;BR /&gt;row2.bid = ti.getBid();&lt;BR /&gt;row2.askv = ti.getAskv();&lt;BR /&gt;row2.bidv = ti.getBidv();&lt;BR /&gt;&lt;/PRE&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;tJavaFlex / End Code: 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;PRE&gt;}&lt;/PRE&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;And that creates the flow. I think the memory usage peaks a little, but the files are not longer than 1-2MB, so that shouldn't be too much of an issue. Very cool, this brings me a huge leap forward. Thank you Talend!!</description>
      <pubDate>Sun, 02 Oct 2016 00:06:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Binary-File-as-Input/m-p/2351481#M118123</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-02T00:06:45Z</dc:date>
    </item>
  </channel>
</rss>

