B4A Question [RESOLVED] Different results from: string.GetBytes, File.ReadBytes and RandomAccessFile.ReadBytes - RB Smissaert    Dec 7, 2023 Pharmacy¬Visible¬
Reading this as string I get bytes -62 and -84 for the ¬ character and and only byte 10 for the linebreak
Reading this string from a text file (.csv) I get only byte -84 for the ¬ character and... 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... 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... B4i Question ALAssetLibrary: read bytes from an asset - wl    Mar 11, 2019 . This will probably be easy: however I need to get a byte stream (with the photo or video), which should be able to obtain with ALAssetRepresentation -> getBytes (see: https://developer.apple.com/documentation/assetslibrary/alassetrepresentation) func getBytes(_ buffer: UnsafeMutablePointer... Int but I have no clue on how to include the objective c code for this call and return a byte array...: orientation:0]; return _image; } But how should I modify this code to return the byte array ? Thanks !... 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 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 Question ReadBytes(buffer,0,buffer.Length) - schimanski    Dec 25, 2010 Hello together!
I tried to read a string from a server to bytes, but when I read out the buffer...=InputStream1.ReadBytes(buffer,0,buffer.Length)
end if
Thanks or help....... 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 Question Read bytes into Ints and strings - Pedro Caldeira (first post)    Nov 12, 2018 Worked like a charm. Your them man Erel !!! :)... B4J Question [SOLVED] b4J how to read Uint32(4byte) and Float (4byte) from UTP packed_Arrived - stefanogoria    Nov 22, 2023 Hello to all, I am looking for info about reading e convert data received from Packe_Arrived on UDP, any suggestions ?
Data are of two types Uint32(4 bytes) and Float(4 bytes)
Thanks in advance !!... Page: 1   2   3   4   5   6   |