J JJ37 Member Feb 10, 2019 #1 Hi I am new to B4J and want to load a HTML page into the HTMLeditor control. This is what I have tried (without success). HTMLEditor1.HtmlText = File.OpenInput("c:\","test.html") test.html is a simple webpage, but it's not showing.
Hi I am new to B4J and want to load a HTML page into the HTMLeditor control. This is what I have tried (without success). HTMLEditor1.HtmlText = File.OpenInput("c:\","test.html") test.html is a simple webpage, but it's not showing.
Erel B4X founder Staff member Licensed User Longtime User Feb 11, 2019 #2 File.OpenInput returns an InputStream. You need to use File.ReadString. Upvote 0
J JJ37 Member Feb 11, 2019 #3 Thank you sir. May I ask in what situation it is appropriate to open a file stream using Input/OutputStream. Is it to save and load binary data? Upvote 0
Thank you sir. May I ask in what situation it is appropriate to open a file stream using Input/OutputStream. Is it to save and load binary data?
Erel B4X founder Staff member Licensed User Longtime User Feb 12, 2019 #4 JJ37 said: Is it to save and load binary data? Click to expand... No. You should use File.ReadBytes / WriteBytes in this case. There are methods that expect an InputStream. Mainly to avoid loading the complete file to memory. AsyncStreams.WriteStreams for example. Upvote 0
JJ37 said: Is it to save and load binary data? Click to expand... No. You should use File.ReadBytes / WriteBytes in this case. There are methods that expect an InputStream. Mainly to avoid loading the complete file to memory. AsyncStreams.WriteStreams for example.