Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
greubel
Visitor

How to load a binary file ?

Need to load something that is not a html or txt file.
I tried a GetToString() but that fails. I checked my server and it says it completed with a 200 status and all the bytes transfered.

What I'm trying to do is load an .itc file. Then strip off the iTunes header and
save it in the tmp: directory as a .jpg

Is there a GetToBinary ?

Even tried it by changing the mime type of .itc to txt
0 Kudos
2 REPLIES 2
RokuKevin
Visitor

Re: How to load a binary file ?

roUrlTransfer has a GetToFile(String filename) method that can save the contents of a url request to a file.

Please see Section 4.25 of the component reference manual.

--Kevin.
0 Kudos
RokuAaron
Visitor

Re: How to load a binary file ?

Try roUrlTransfer.GetToFile. (See component reference for details)

Then use roByteArray to do binary reads/writes. (See BrightScript reference for details)

Store your temp files in the tmp:/ partition, and remember to delete it when finished.
0 Kudos