> I am getting the incorrect data downloaded as Mike Engledew said he used the
> "raw" output method to fix. However, "raw" is not listed as one of the
> valid types for this option.
> So how should I ensure binary files get downloaded. accurately?
Any SSCCE?
> On Thu, Jan 28, 2016 at 3:08 AM, Christian Grün <christian.gruen@gmail.com>
> wrote:
>>
>> See here: http://docs.basex.org/wiki/Serialization
>>
>> Am 28.01.2016 7:13 vorm. schrieb "E. Wray Johnson"
>> <wray.johnson@gmail.com>:
>>>
>>> With 8.4...
>>>
>>> declare option output:method "raw";
>>>
>>> I get
>>>
>>> [SEPM0016] Value of 'method' must be one of
>>> (xml,xhtml,html,json,csv,text,adaptive,basex).
>>>
>>> On Sat, Jan 16, 2016 at 2:06 PM, Mike Engledew <mike.engledew@gmail.com>
>>> wrote:
>>>>
>>>> If like me your using BaseX 8.3.1 don't forget to add ...
>>>>
>>>> declare option output:method "raw";
>>>>
>>>> before the db:retrieve() otherwise you won't get back what you put in.
>>>> I learned this the hard way trying to extract binary files that were
>>>> stored in codepage IBM1047 and it took me a while to figure out why they
>>>> came back translated;
>>>>
>>>>
>>>> On Fri, Jan 15, 2016 at 11:11 AM, E. Wray Johnson
>>>> <wray.johnson@gmail.com> wrote:
>>>>>
>>>>> When using the sample Java client to store/retrieve binary/raw files I
>>>>> have to execute separate open/close commands. It is my understanding that
>>>>> this locks the database. In a multi-user scenario, such locking is
>>>>> undesirable as binary/raw files can be quite large. And since there is no
>>>>> alteration of the indexes etc during such operations, is there a better way?
>>>>> Also, why isn't there a corresponding retrieve method on the Java client,
>>>>> similar to the store method?
>>>>>
>>>>> My code to store:
>>>>> BaseXClient session = new BaseXClient(host, port, username, password);
>>>>> session.execute("open " + database);
>>>>> session.store(path, inputStream);
>>>>> session.execute("close");
>>>>>
>>>>> My code to retrieve:
>>>>> BaseXClient session = new BaseXClient(host, port, username, password);
>>>>> session.execute("open " + database);
>>>>> session.execute("retrieve " + path, outputStream);
>>>>> session.execute("close");
>>>>>
>>>>> Thanks in advance!
>>>>>
>>>>>
>>>>
>>>
>
See here: http://docs.basex.org/wiki/Serialization
Am 28.01.2016 7:13 vorm. schrieb "E. Wray Johnson" <wray.johnson@gmail.com>:With 8.4...declare
option
output:method
"raw"
;
I get
[SEPM0016] Value of 'method' must be one of (xml,xhtml,html,json,csv,text,adaptive,basex).On Sat, Jan 16, 2016 at 2:06 PM, Mike Engledew <mike.engledew@gmail.com> wrote:If like me your using BaseX 8.3.1 don't forget to add ...declare
option
output:method
"raw"
;
before the
db:retrieve() otherwise you won't get back what you put in.I learned this the hard way trying to extract binary files that were stored in codepage IBM1047 and it took me a while to figure out why they came back translated;On Fri, Jan 15, 2016 at 11:11 AM, E. Wray Johnson <wray.johnson@gmail.com> wrote:My code to retrieve:When using the sample Java client to store/retrieve binary/raw files I have to execute separate open/close commands. It is my understanding that this locks the database. In a multi-user scenario, such locking is undesirable as binary/raw files can be quite large. And since there is no alteration of the indexes etc during such operations, is there a better way? Also, why isn't there a corresponding retrieve method on the Java client, similar to the store method?My code to store:BaseXClient session = new BaseXClient(host, port, username, password);
session.execute("open " + database);
session.store(path, inputStream);
session.execute("close");BaseXClient session = new BaseXClient(host, port, username, password);Thanks in advance!
session.execute("open " + database);
session.execute("retrieve " + path, outputStream);
session.execute("close");