octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FTP objects


From: David Bateman
Subject: Re: FTP objects
Date: Wed, 02 Dec 2009 13:55:48 +0100
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706)

Judd Storrs wrote:
I didn't find any documentation that describes the format, but based
on gazing at stored java.lang.stringbuffer objects my feeling is that
the first 101 bytes are the object structure and the following bytes
are a wide string buffer (unicode?) and the last byte always contains
120.

Within the object structure only bytes positions 77 and 101 vary. Byte
77 appears to hold the length of the string and 101 holds the buffer
size.
Extracting the strings themselves should be relatively easy as you have shown. However, the type of the remotePwd and type fields is java.lang.StringBuffer and so to properly read and save these objects we'd have to add a type to octave with this name. Unless we are going to add java to the core of Octave that is probably a bad idea.

Without the java.lang.StringBuffer type, the octave_value for these fields is an unknown type and an error will result for the first access to these fields in the loadobj method the ftp class.

Cheers
David

--
David Bateman                                address@hidden
35 rue Gambetta                              +33 1 46 04 02 18 (Home)
92100 Boulogne-Billancourt FRANCE            +33 6 72 01 06 33 (Mob)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]