Martin,
Thank you! The code ref was helpful to see how transfer and parsing happens
server and client side. Bytes are read and handled (escape, valid, term)
one at a time. I was trying to read all the data from the server,
decode/de-0xFF and then put in a buffer for parsing. Bzzzt...the escape
info is needed for parsing. I guess I could parse the escaped data the
decode but I'm only burning memory doing it that way.
Best,
Erik

On Fri, Nov 4, 2022 at 6:55 AM Martin Honnen <martin.hon...@gmx.de> wrote:

>
> Am 11/4/2022 um 10:27 AM schrieb Martin Honnen:
>
>
> Am 11/4/2022 um 1:38 AM schrieb Erik Peterson:
>
> The CLI basexclient uses the same client api as other clients found here
> yes? https://docs.basex.org/wiki/Clients
>
> from basexclient CLI
> >BINARY GET lib/example.jpg
> as expected, returns the jpg I PUT from there from my client app. However,
> the same command BINARY GET from my client app, using
> COMMAND {command} {result} {info} \00
>  does not return the jpg. The bytes going to the basex server, at least
> the command 'BINARY GET lib/example.jpg' part are identical in both cases.
>
> Which client API exactly do you use, which result or error do you get?
>
> There is a Java sample for a binary resource online at
> https://github.com/BaseXdb/basex/blob/10.3/basex-examples/src/main/java/org/basex/examples/api/BinaryExample.java
> (confusingly it uses retrieve instead of BINARY GET).
>
> I have tested that the example works with BaseX 103 if "retrieve" is
> replaced by "BINARY GET".
>
> So it seems
> https://github.com/BaseXdb/basex/blob/10.3/basex-examples/src/main/java/org/basex/examples/api/BaseXClient.java
> needs to be updated/patched.
>

Reply via email to