Author Topic: Getting a document as binary.  (Read 3631 times)

pankaj.puranik

  • Sr. Member
  • ****
  • Posts: 374
    • View Profile
Getting a document as binary.
« on: April 14, 2011, 09:40:08 AM »
Hi

Is it possible to get a document as a binary/byte array or something, file from CMOD.
After getting the binary file/byte, I would use my java classes to interprete and open the document with the correct viewer.

Is there an API that can help me with this?

Thanks
Pankaj.

Alessandro Perucchi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1002
    • View Profile
Re: Getting a document as binary.
« Reply #1 on: April 14, 2011, 11:26:12 PM »
Hello Pankaj,

I'm not sure to understand your question... I mean, you can save binaries in CMOD (like MP3, ZIP, DIVX, ...) so it means you can also retrieve them as is.

What do you mean exactly?

Cheers,
Alessandro
Alessandro Perucchi

#Install #Migrations #Conversion #Educate #Repair #Upgrade #Migrate #Enhance #Optimize #AIX #Linux #Multiplatforms #DB2 #Windows #Oracle #TSM #Tivoli #Performance #Audits #Customizing #Availability #HA #DR #JavaApi #ContentNavigator #ICN #WEBi #ODWEK #Services #PDF #AFP #XML

Justin Derrick

  • IBM Content Manager OnDemand Consultant
  • Administrator
  • Hero Member
  • *****
  • Posts: 2231
  • CMOD Guru for hire...
    • View Profile
    • Tenacious Consulting
Re: Getting a document as binary.
« Reply #2 on: April 15, 2011, 06:18:35 AM »
Any retrieval from CMOD is a series of bytes.  All data is a series of bytes, when you think about it.

If you want to pull data into a program via API, then use the API and store the retrieved data locally (in memory or in a file) for processing.

I'm with Alessandro here -- I have no idea what you're actually trying to achieve.

-JD.
IBM CMOD Professional Services: http://TenaciousConsulting.com
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Education & Webinars:  https://CMOD.Training/

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR

javed.khan

  • Jr. Member
  • **
  • Posts: 25
    • View Profile
Re: Getting a document as binary.
« Reply #3 on: March 27, 2012, 11:42:01 PM »
If I have understood you question correctly, there is a way where you can get the mimetype of the document you are downloading. But this is only possible if you have different Application Groups for different formats of document. If you have specified the format of the document in Application Group as user defined then there is no way to identify the type of document. A work around will be to add a TLE value of File Format and then decide the type of viewer using it.