B4A Library [B4X] BytesBuilder - simplifies working with arrays of bytes - Erel    Oct 13, 2019   (42 reactions)   tags: array, B4X BytesBuilder Class, B4X, string byte Edit: BytesBuilder is included in B4XCollections library (named B4XBytesBuilder).
BytesBuilder... As BytesBuilder
bb.Initialize
For i = 0 To 255
bb.Append(Array As Byte(i))
Next
bb.Insert(1, Array... B4A Code Snippet [B4X] Bytes To File - Erel    May 24, 2020   (19 reactions)   tags: Image, Share Images, Bytes, B4X, B4X Bytes To File the RandomAccessFile library Tags: Bytes, Serialization Working with bytes? Check BytesBuilder: https://www.b4x.com/android/forum/threads/b4x-bytesbuilder-simplifies-working-with-arrays-of-bytes.89008/...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... B4A Library [B4X] [class] MJPEG decoder - Erel    Jul 9, 2018   (15 reactions)   tags: B4X CLASS MJPEG Decoder, Video, Erel down the program). Edit: For new projects it is recommended to use BytesBuilder. The following sub is used to search for strings or bytes in the raw bytes directly: Private Sub IndexOfString(s As String, Start As Int) As Int Return IndexOf(s.GetBytes("ASCII"), Start) End Sub Private Sub IndexOf(bs() As Byte, Start As Int) As Int For i = Start To index - 1 - bs.Length For b... and raw bytes. It is tempting to convert the bytes to a string. However raw bytes do not represent... B4A Library [B4X] APNG - animated PNG - Erel    Dec 24, 2023   (48 reactions) https://apng.onevcat.com/assets/elephant.png (image source: https://apng.onevcat.com/demo/) APNG is a format that extends PNG with support for animations, similar to animated gifs. This class, which is implemented in B4X, extracts the frames from the APNG file and creates the animation. It doesn't support all possible formats. If you encounter a file that is not supported then post it Under the hood it uses RandomAccessFile + BytesBuilder + BitmapCreator + native CRC32 implementation to... B4A Library [B4X] QRGenerator - Cross platform QR code generator - Erel    Apr 26, 2020   (47 reactions)   tags: QR, Code, QRGenerator, qrcode, B4X QRGenerator QRCode, B4X formats. BytesBuilder was replaced with B4XBytesBuilder from B4XCollections library.
V1.20 - Adds...://www.b4x.com/basic4android/images/SS-2018-05-16_18.56.16.jpg
Can create codes made of up to 2953 bytes.
It depends on XUI library and B4XCollections v1.50+.
It uses the very useful B4XBytesBuilder... is attached with QRGenerator class.
Versions
V1.60 - Added support for 1-L (max size is 17 bytes).
V1.50... B4A Library [B4X] B4XCollections - More collections - Erel    Mar 8, 2022   (38 reactions)   tags: xui (i) = False Then Log(i)
Next
B4XBytesBuilder - Replaces BytesBuilder.
A collection with features similar to String and StringBuilder features. Holds raw bytes instead of characters.
Very useful when... B4A Question Random Access file data - MicroDrie (first post)    May 6, 2024 Maybe you can simplify things by using BytesBuilder - simplifies working with arrays of bytes library.... B4A Question Unable to use ByteBuilder - toby    Nov 16, 2020
Depends on ByteConverter library (iRandomAccessFile in B4i).
My B4A version is the latest one (10.02) and I added following two libraries: B4XCollections (1.08) & ByteConverter (1.10) to the project, but the ByteBuilder object in IDE is still underscored with "missing library reference".
Dim bb As BytesBuilder '"missing library reference".
bb.Initialize... B4A Tutorial [B4X] AsyncStreams Tutorial - Erel    Feb 22, 2018   (10 reactions)   tags: B4A BytesBuilder class to collect and parse the messages. Notes When a new message is available... is with a Timer that checks whether there are bytes waiting in the buffer. However even if there are bytes... AStreams_NewData (Buffer() As Byte) Dim msg As String msg = BytesToString(Buffer, 0, Buffer....Text.Length > 0 Then Dim buffer() As Byte buffer = EditText1.Text.GetBytes... data available we convert the bytes to string and show it: Sub AStreams_NewData (Buffer() As Byte... B4J Question byte in binary format to number conversion after reading on usb - emexes (first post)    Mar 2, 2025   (1 reaction)
Is it finding packets?
I should have done it using BytesBuilder but I could see you'd already made a start using a String as a buffer, so I followed your lead.
Strings have a method .CharAt to extract a single character ("byte") that is simpler than using .SubString2
eg... its ASCII ("byte") value 105... Page: 1   2   3   4   5   6   7   |