It's all about the answers!

Ask a question

" " symbols were found while using contentManager.storeContent() API


ast java (4512048) | asked Dec 22 '15, 12:18 a.m.
Hi All,
I am using contentManager.storeContent() API to upload the "process template" contents to the server.
But, when i use BC(beyond Compare) tool for spectification.txt to see the changes, i found some strange symbol in the text file like " " as below.

Please let me know weather there is any mismatch attribute used in the below API or something i need to change.
-------------------------------------------------------------------------------------------------------------------------------------
<property name="text" type="xsd:string"> </property>
                                            <property name="text" type="xsd:string"> </property>

 <property name="text" type="xsd:string"> </property>
                                            <property name="text" type="xsd:string"> </property>
--------------------------------------------------------------------------------------------------------------------------------------
attachmentContent =
              this.teamRepo.contentManager().storeContent(
                  attachmentType,
                  attachmentType.startsWith("text") ? "UTF-8" : null,
                      attachmentType.startsWith("text") ? LineDelimiter.LINE_DELIMITER_PLATFORM
                          : LineDelimiter.LINE_DELIMITER_NONE, new FileInputStream(attachmentFile), null, taskMonitor);

------------------------------------------------------------------------------------------------------------------------------------------

One answer



permanent link
Ralph Schoon (63.2k33646) | answered Dec 22 '15, 1:37 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I'd check what the encoding was when downloading the content.

Comments
ast java commented Jan 14 '16, 1:21 a.m. | edited Jan 14 '16, 3:45 a.m.

Hi Ralph,
When i update the process template through mentioned RTC API , the specification.txt does not show any special character. Once update is done and i download the project area from the RTC then i can see the special character in the specification.txt.


Ralph Schoon commented Jan 14 '16, 5:30 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I can't comment on that. I don't even know what you are achieving here. Maybe you use the wrong storeContent() method or your case is not really covered.

If you mean, you are manipulating the process XML and storing that data, then this is done in a different way, if I am not mistaken.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.