B4J Question Convert an array of Bytes to an array of Ints - OliverA (first post)    Dec 27, 2022   (2 reactions) This code will convert each individual byte array element to an integer array element. ByteConverter will convert two byte array elements into one integer array element. B4A Library [B4X] BytesBuilder - simplifies working with arrays of bytes - Erel    Oct 13, 2019   (42 reactions) Dependencies: B4A, B4J - ByteConverter B4i - iRandomAccessFile Example: Dim bb As BytesBuilder bb.Initialize For i = 0 To 255 bb.Append(Array As Byte(i)) Next bb.Insert(1, Array As Byte(0xFF, 0XFF, 0xFF)) Log(bb.IndexOf(Array As Byte(10, 11, 12))) Log(bb.IndexOf(Array As Byte(0))) Log(bb.IndexO B4A Library ByteConverter library - agraham    Dec 15, 2015   (13 reactions) It's occasionally useful to be able to poke around in things as arrays of bytes so this library lets you do it.
It can transform arrays of primitive types to and from arrays of bytes with the "endian-ness" of the conversion specified. If you need endian-ness you will either know about it or rather B4J Question How to access byte array as int/short value directly without overhead? - agraham (first post)    Nov 10, 2022   (1 reaction) You won't get faster than using ByteConverter to map byte arrays to and from other types. Most methods are a thin wrap of Java ByteBuffer that is optimised for such accesses. B4A Class [B4X] PDF Generator - B4X Cross Platform - Class 100% B4X Code - Erel (first post)    Jan 15, 2023   (2 reactions) You should use ByteConverter.HexFromBytes in all platforms. B4A Question Downloading B4J libraries ... - Erel (first post)    Jan 29, 2016 Moved to the questions forum.
The ByteConverter is a B4A library that is also compatible with B4J. B4A Question Inline Java - Erel (first post)    Jul 21, 2015   (2 reactions) BTW, you can use ByteConverter to convert an array of bytes to a hex string.
It should also be simple to convert this code to B4A (don't use this Java code. It will work very bad with non-small arrays). B4R Question Passing a char array to a inline C code - Erel (first post)    Jan 22, 2018   (2 reactions) You can use ByteConverter to search in arrays of bytes. You will need to read the data to an array and then search in it. You should of course only load small parts of the data each time. B4A Question Great prog ... but a few questions - DonManfred (first post)    Mar 24, 2015   (1 reaction) Byteconverter Bug? [Solved] ByteConverter library not found - klaus (first post)    May 02, 2020   (2 reactions) ByteConverter is an additional libray, it's not part of the RandomAccessFile library! Page: 1   2   3   4   5   6   7   Powered by ColBERT |