B4R Code Snippet Firebase Push Messages (FCM) - Erel    Oct 28, 2019   (3 reactions)   tags: B4R .CurrentPosition)) End Sub Private Sub WriteBytes(raf As RandomAccessFile, Data() As Byte) raf...) As Byte 'must be large enough to hold the message payload Dim raf As RandomAccessFile raf.Initialize(buffer, True) WriteBytes(raf, "{""data"":{""title"":""") WriteBytes(raf, Title) WriteBytes(raf, """,""body"":""") WriteBytes(raf, Body) WriteBytes(raf, "... B4A Question writing data to a raf from Astreams New data - Erel (first post)    Jul 19, 2013 You should see the required parameters in the IDE or here: http://www.b4x.com/search?query=randomaccessfile.writebytes... 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... the RandomAccessFile library Tags: Bytes, Serialization Working with bytes? Check BytesBuilder: https://www... B4A Question Save b4a preferencedialog map valute and retrive from file - Erel (first post)    Sep 10, 2023   (3 reactions)
Dim ser As B4XSerializator 'RandomAccessFile
File.WriteBytes(XUI.DefaultFolder, "map.obj", ser.ConvertObjectToBytes(map))
Dim map As Map = ser.ConvertBytesToObject(File.ReadBytes(XUI.DefaultFolder, "map.obj"))... B4R Question [rHttpUtils2] POST request does not work [SOLVED] - Johan Hormaza    Jan 4, 2022 (Job.Response) End If End Sub Private Sub WriteBytes(raf As RandomAccessFile, Data() As Byte) raf.WriteBytes(Data, 0, Data.Length, raf.CurrentPosition) End Sub ErrorMessage: Failed to... Dim buffer(300) As Byte Dim raf As RandomAccessFile raf.Initialize(buffer, True) WriteBytes(raf, "{""id"":""61751246""") WriteBytes(raf, "}") HttpJob.Initialize("Example2... B4A Question Recompose a picture from a TCP/IP stream... - Erel (first post)    May 6, 2015 There are several ways to do it. The simplest is to create a temporary file and write the new bytes with RandomAccessFile.WriteBytes.... B4A Question Need better performance of my sub - Erel (first post)    Dec 3, 2015   (1 reaction) Yes. You can split it and encrypt it. Split the file into multiple smaller files and encrypt each part. Decrypt each part and write it to the unencrypted file with RandomAccessFile.WriteBytes.... B4A Tutorial Encrypting information with RandomAccessFile library - Erel    Sep 18, 2011   (3 reactions) RandomAccessFile v1.30 introduces two new methods named: WriteEncryptedObject and... - RandomAccessFile
Example of writing an encrypted List to a file:
Sub Activity_Create(FirstTime... #" & i)
Next
'writing the object
Dim raf As RandomAccessFile
raf.Initialize(File... B4A Question Fixed size records in RandomAccessFile - Erel (first post)    Sep 10, 2014 Don't use ReadObject / WriteObject for fixed records. It is not efficient and there are too many parameters that you don't control.
Instead create a simple method that writes your type:
Sub WriteRec(rec As REC_TYPE, raf As RandomAccessFile)
raf.WriteBytes(rec.Id, 0, rec.Id.Length, raf.CurrentPosition)
raf.WriteDouble(rec.Value, raf.CurrentPosition)
End Sub
You will need to implement... B4J Library [B4X] MinimaListUtils - aeric    Mar 8, 2026   (13 reactions) Version : 3.00 A utility class to manipulate a simple List of Map to do basic CRUD. Treat it as some kind of a NoSQL for key-value pairs. It is suitable for small demo if you don't want to use 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... to RandomAccessFile Version 1.06 Added Clone Update Reverse return the resulted object Update... Page: 1   2   3   4   5   |