I'm trying to read from a file. The first object is a string, but when I try to read it, I get an Out of Memory error:
If, on the other hand, I read the file with readBytes, it works, but then I have to rebuild my objects, so this isn't very efficient.
Thoughts anyone?
-Sterling
B4X:
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
If, on the other hand, I read the file with readBytes, it works, but then I have to rebuild my objects, so this isn't very efficient.
Thoughts anyone?
-Sterling