Hi Buddy on Web,
ClientSession session = new ClientSession(host, port, user, pwd); session.open("MyDb");
The open function is unknown to me. Have you added it by yourself, or do you use a ClientSession class different to the one in our project?
Store cmd = new Store("newFile.txt"); cmd.setInput(bais); session.execute(cmd);
The ClientSession.store(...) function from our official source code will do what you want.
Christian
session.close();
Note sure if this helps, but this is the stack trace I get.
org.basex.core.BaseXException: Stopped at , 1/63: Syntax: STORE (TO [path]) [input] Store raw data.
Stores raw data to the specified [path]. at org.basex.api.client.ClientSession.receive(ClientSession.java:193) at org.basex.api.client.ClientSession.execute(ClientSession.java:162) at org.basex.api.client.ClientSession.execute(ClientSession.java:167) at org.basex.api.client.Session.execute(Session.java:36) ......