- Joined
- Jan 2, 2020
- Messages
- 1,229
Externals that are hungry for data. What would be the better way to transfer big amounts of data to an external JAVA code? Should you use array? temporary shared files? We're talking maybe 200k - 2MB thereabout.
Strict
Import brl.databuffer
Import mojo
Class myApp Extends App
'------------------------------------------------------------
Method CreateBuffer:DataBuffer(len:Int)
Local retbuf:= New DataBuffer(len)
Return retbuf
End
'------------------------------------------------------------
Method SetBuffer:Void(db:DataBuffer, index:Int, value:Int)
db.PokeInt(index, value)
End
'------------------------------------------------------------
Method OnCreate:Int()
Local myDB:DataBuffer = CreateBuffer(1024)
SetBuffer(myDB, 1, 1000)
Return 0
End
End
Function Main:Int()
New myApp
Return 0
End
class c_myApp extends c_App{
public final c_myApp m_myApp_new(){
super.m_App_new();
return this;
}
public final c_DataBuffer p_CreateBuffer(int t_len){
c_DataBuffer t_retbuf=(new c_DataBuffer()).m_DataBuffer_new(t_len,false);
return t_retbuf;
}
public final void p_SetBuffer(c_DataBuffer t_db,int t_index,int t_value){
t_db.PokeInt(t_index,t_value);
}
public final int p_OnCreate(){
c_DataBuffer t_myDB=p_CreateBuffer(1024);
p_SetBuffer(t_myDB,1,1000);
return 0;
}
}