[jsword-devel] PersonalJava version of JSword
Sun, 11 Jan 2004 21:28:10 +0100 (CET)
>>I am not sure whether zipping would be useful, since I think it would be
>>good to be able to do random access in the file. And the memory
>>is not as much "disk" space (i.e. memory stick, 128MB in my case), but
>>more the RAM. Reading a whole book at once does not seem like an option
> Hi Eric!
> Java has a nifty class called Properties. We could create index with it,
> which would make loading very easy. Java can implement LineReader class
> whicg works with Streams, so we could easiliy read from files. For example
> Jn 1, 12-30 (John... I don't know official abvbrev,. since my langauge
> different Letters..), we would read property Jn, which would display file,
> then Jn1-12, which would point us to line 12 of chapter 1 of John
> Evangelium, next line has one line more, etc, etc... Ram usage would be
Aren't Properties read all at once, using load()? That would mean, that
all properties, i.e. the whole bible, would be read at once and stored in
memory, which is not suitable for a P800.
> I can't tell you how it;s done now, but I think that on each query XML
> parser is called and text parsed, to get the results...
Since parsing an XML file would be done by starting at the beginning, and
scanning through the file until you find the location you were looking
for, this does not seem fast enough, at least on a slower device.
I have to say that I like the compressed format of Stephen *a lot*,
perhaps enhanced for extra info that is now encoded in XML.