octave-maintainers
[Top][All Lists]
Advanced

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

Re: FTP objects


From: Judd Storrs
Subject: Re: FTP objects
Date: Wed, 2 Dec 2009 06:10:08 -0500

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.

>> find ( fp.remotePwd(1:101) != fp.type(1:101) )
77 101

I don't know if the object data will depend on the java version.
Attached are two functions that I think work to read and create the
strings with the caveat that they only work for ascii.

I haven't yet figured out how load a fake java.lang.stringbuffer
object into Matlab so I haven't verified that the created buffer will
actually load there yet.


--judd

Attachment: extract_java_lang_stringbuffer.m
Description: Text Data

Attachment: create_java_lang_stringbuffer.m
Description: Text Data


reply via email to

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