B4A Question [RESOLVED] Different results from: string.GetBytes, File.ReadBytes and RandomAccessFile.ReadBytes - RB Smissaert    Dec 7, 2023 the linebreak
Reading this string from a text file (.csv) I get only byte -84 for the ¬ character and... string:
arrBytes = strString.GetBytes("UTF8")
'reading file, using File... B4i Question Different behavior of File.ReadBytes (Dir, fileName) - Star-Dust    Mar 9, 2021 phase.
But after a lot of testing and a lot of time I realized that the problem is on file.ReadBytes.
In debug mode, I read a file from dirAsstes (or from DitTemp) and it tells me the right size and..., fileName) and in fact with file.ReadBytes it produces me a bigger array.
Why?
At first glance it would... B4A Code Snippet [B4X] Bytes To File - Erel    May 24, 2020   (19 reactions)   tags: Image, Share Images, Bytes, B4X, B4X Bytes To File This code is no longer needed. Use File.WriteBytes / ReadBytes. Write an array of bytes to a file and read a file into an array of bytes. Sub BytesToFile (Dir As String, FileName As String, Data() As Byte) Dim out As OutputStream = File.OpenOutput(Dir, FileName, False) out.WriteBytes(Data, 0, Data.Length) out.Close End Sub Sub FileToBytes (Dir As String, FileName As String) As Byte() Return Bit.InputStreamToBytes(File.OpenInput(Dir, FileName)) End Sub Note that you can convert... B4A Question Diffrence size of file in BitmapToString & ImageToBytes & File.ReadBytes - Erel (first post)    Apr 29, 2024   (1 reaction) Different jpeg encoder. Different jpeq quality setting.... B4J Question Unexpected Result from File.ReadString and File.ReadBytes on UTF-8 Text File - B4XDev (first post)    Jan 6, 2022 I iterated through a File.ReadList() version, and those lines come up as .length = 0... So, everything seems to be as you say. ?
Thank you!... B4A Question [ExternalStorage] How to read a file as bytes from USB stick? - prbmjr (first post)    May 9, 2021
No. Better:
Dim b() As Byte = Bit.InputStreamToBytes(inputstream)
BytesAvailable is only an estimation and can return less than the complete size.
Perfect EREL!
You took the words from my... B4A Question How do I read 4 bytes from a file ... - grafsoft    Oct 13, 2017 ... that represent an unsigned integer into an integer variable?
Thanks
Peter... B4A Library [B4X] WebP images - Erel    Feb 12, 2025   (15 reactions) , %WINDIR%\System32\robocopy.exe, ..\Objects\b4xlibs\Files temp\build\bin\ webp.dll Usage instructions: Dim WebP1 As WebP WebP1.Initialize ImageView1.SetBitmap(WebP1.LoadWebP(File.ReadBytes(File... B4A Question Read raw bytes of a file - Michael Müller Anywhere (first post)    Nov 25, 2021 You were right. The program froze it at more than 200,000 bytes and I had to split the string. Now it works wonderfully!... B4J Library [B4X] MinimaListUtils - aeric    Mar 8, 2026   (13 reactions) SQL database. Depends on: RandomAccessFile Note: You can use File.ReadBytes and File.WriteBytes to read/write to a file. This b4xlib replaces the class from MinimaList formerly published in... developing with Web API Template 2.04+. 146981 Properties First As Map (read) Last As Map (read) List As List (read/write) CaseSensitive As Boolean (read/write) Methods Add (M As Map) Clone... read only Last property is now read only Updated List property (write) Updated Add sub Updated Clone... Page: 1   2   3   4   5   6   7   |