Dim levelRAF As RandomAccessFile
Dim signature As String
If File.Exists(File.DirRootExternal, "/Scooper/level.level") Then
levelRAF.Initialize(File.DirRootExternal, "/Scooper/level.level", False)
signature = levelRAF.readObject(signature,levelRAF.CurrentPosition)
Log("Signature: " & signature)
Else
Log("No File")
End If
Steve,the Documentation has
B4X:ReadObject(Position As Long) As Object
signature = levelRAF.readObject(levelRAF.CurrentPosition)
Dim BC As ByteConverter
Dim levelRAF As RandomAccessFile
levelRAF.Initialize(File.DirRootExternal, "level.level", False)
Dim B() As Byte = BC.StringToBytes("Test","UTF-8")
Log(B.Length)
levelRAF.WriteBytes(B,0,4,0)
levelRAF.Flush
levelRAF.Close
Log("Here...")
Dim signature As String
If File.Exists(File.DirRootExternal, "level.level") Then
levelRAF.Initialize(File.DirRootExternal, "level.level", False)
signature = levelRAF.readObject(levelRAF.CurrentPosition)
Log("Signature: " & signature)
Else
Log("No File")
End If
Dim levelRAF As RandomAccessFile
levelRAF.Initialize(File.DirRootExternal, "level.level", False)
levelRAF.WriteObject("Test",False,0)
levelRAF.Flush
levelRAF.Close
Log("Here...")
Dim signature As String
If File.Exists(File.DirRootExternal, "level.level") Then
levelRAF.Initialize(File.DirRootExternal, "level.level", False)
signature = levelRAF.readObject(levelRAF.CurrentPosition)
Log("Signature: " & signature)
Else
Log("No File")
End If
levelRAF.Initialize2(File.DirRootExternal, "/Scooper/level.level", False,True)
B4X:levelRAF.Initialize2(File.DirRootExternal, "/Scooper/level.level", False,True)
Use ReadString if it is just a string.
.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?