<?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: Convert jpg file to base64 in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Convert-jpg-file-to-base64/m-p/2540512#M148311</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Thank you. I switched to input_row and got the same error at the same line. I then changed the name of the flow between the tFileInputRaw to the tJavaRow2 from "output_row" to row4 and the error disappeared.&lt;/P&gt;&lt;P&gt;Are "input_row" and "output_row" special attributes/properties for a tJavaRow?&lt;/P&gt;</description>
    <pubDate>Thu, 08 Jan 2026 11:48:33 GMT</pubDate>
    <dc:creator>Dobby1</dc:creator>
    <dc:date>2026-01-08T11:48:33Z</dc:date>
    <item>
      <title>Convert jpg file to base64</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-jpg-file-to-base64/m-p/2540449#M148306</link>
      <description>&lt;P&gt;I'm using tFileInputRaw to read a jpg file followed by tJavaRow to get the base64 encoding for the file. I get "&lt;SPAN&gt;java.lang.NullPointerException: Cannot read the array length because "src" is null&lt;/SPAN&gt;" at the line in the tJavaRow when I attempt to encode the byte array. I've set the Mode for the tFileInputRaw to Read the file as a bytes array. I also tried the other modes without success. Here's the code in the tJavaRow:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;&lt;SPAN&gt;byte&lt;/SPAN&gt;&lt;SPAN&gt;[] &lt;/SPAN&gt;&lt;SPAN&gt;bytes&lt;/SPAN&gt;&lt;SPAN&gt; = (&lt;/SPAN&gt;&lt;SPAN&gt;byte&lt;/SPAN&gt;&lt;SPAN&gt;[]) &lt;/SPAN&gt;&lt;SPAN&gt;output_row&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;content&lt;/SPAN&gt;&lt;SPAN&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;//Encode the byte array to a Base64 string&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;String &lt;/SPAN&gt;&lt;SPAN&gt;base64String&lt;/SPAN&gt;&lt;SPAN&gt; = java.util.Base64.&lt;/SPAN&gt;&lt;SPAN&gt;getEncoder&lt;/SPAN&gt;&lt;SPAN&gt;().encodeToString(&lt;/SPAN&gt;&lt;SPAN&gt;bytes&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;//Pass the Base64 string to the output column &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;//output_row.base64ImageString = base64String;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 08 Jan 2026 01:08:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-jpg-file-to-base64/m-p/2540449#M148306</guid>
      <dc:creator>Dobby1</dc:creator>
      <dc:date>2026-01-08T01:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: Convert jpg file to base64</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-jpg-file-to-base64/m-p/2540462#M148308</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To access the input data, here should be input_row.content rather than output_row.content.&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;byte[] bytes = (byte[]) input_row.content;

//Encode the byte array to a Base64 string

String base64String = java.util.Base64.getEncoder().encodeToString(bytes);&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Shicong&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jan 2026 05:48:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-jpg-file-to-base64/m-p/2540462#M148308</guid>
      <dc:creator>Shicong_Hong</dc:creator>
      <dc:date>2026-01-08T05:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: Convert jpg file to base64</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-jpg-file-to-base64/m-p/2540512#M148311</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Thank you. I switched to input_row and got the same error at the same line. I then changed the name of the flow between the tFileInputRaw to the tJavaRow2 from "output_row" to row4 and the error disappeared.&lt;/P&gt;&lt;P&gt;Are "input_row" and "output_row" special attributes/properties for a tJavaRow?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jan 2026 11:48:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-jpg-file-to-base64/m-p/2540512#M148311</guid>
      <dc:creator>Dobby1</dc:creator>
      <dc:date>2026-01-08T11:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: Convert jpg file to base64</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-jpg-file-to-base64/m-p/2540732#M149294</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/284108"&gt;@Dobby1&lt;/a&gt;&amp;nbsp; if you need to access the input data, should use "input_row.columnName". To assign the data to next component, use "output_columnName".&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jan 2026 07:05:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-jpg-file-to-base64/m-p/2540732#M149294</guid>
      <dc:creator>Shicong_Hong</dc:creator>
      <dc:date>2026-01-13T07:05:05Z</dc:date>
    </item>
  </channel>
</rss>

