greubel
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2010
03:33 PM
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
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
2 REPLIES 2

RokuKevin
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2010
03:59 PM
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.
Please see Section 4.25 of the component reference manual.
--Kevin.

RokuAaron
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2010
04:01 PM
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.
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.