muffin stuff#2 (webstart cookies)

[quote]>Eventually that stuff is handled automatically

Most likely it is - there are two bytes (motorola byte order) at the beginning with the file length.

Eg a muffin with “lol” looks like this:


0003 6C6F 6C
   3  l o  l

Well, I’ll still keep that nuke and recreate approach since it’s way simpler and I don’t see any reason for doing that the other (more complicated) way.
[/quote]
/me is silly

Those two bytes are the length information written by DataOutputStream’s writeUTF() ::slight_smile:

However, I have a little problem with two methods…

getText()/readUTF()
setText(String text)/writeUTF(String text)

The former sounds (by convention) somewhat “displayable” and the latter leads to the asumption that there is also the other stuff, which you can find in DataIn/Outputstream like writeShort etc.

Way too much confusion for two “demoing” methods… so… hmm… how about:

writePlainText(String text)
readPlainText()

or something like that?! :stuck_out_tongue:


Something came up which screwed my schedule a bit, but the javadoc stuff is almost done now… I just need to read over it once again (I think).

Plain text sounds good. Simpler.

Kev

Just mailed you that javadoced source btw :wink:

And plain text is it then? Ok :slight_smile:

I’ll add/change that later (need food/sleep :P)

That silly NPE is gone. I accidently copied that www jnlp file over my local jnlp file at the time I tried to do something against that. Silly me :stuck_out_tongue:

An NPE is thrown if the directoy doesn’t exist… so getNames should return an empty String array then (like it does if the directoy exists but doesnt contain any muffins).

http://kaioa.com/src/tools/MuffinTest4c.jnlp
http://kaioa.com/src/tools/MuffinTest4c.jar

That’s the new test thingy. It should work in both cases - webstarted and lauchned locally.

The used directory in non-webstart mode is:
“user.dir”+"/Muffin Test4c/"

Source code follows after cleanup/commenting. Well, for now we need some testing :wink:


Kev, you got mail :wink:

Dear diary… ;D

Well, ok I thought it would be nice to write something about the current status of this little project.

Right now there are 6 klasses (5 public 1 inner) and their size is about 8kb (jared).

It’s now basically done and works pretty well. Using it is also really painless (as intended).

Javadoc-wise I’m also halfway through, but I noticed (while writing the docs) that I forget to test if using pathes works correctly. However, it will be done pretty soon now :slight_smile:

How’s this coming? I’d love to use the API in Rimscape as I’ve come to the point where I want to implement its usage… like… today :slight_smile: Can I expect javadocs soon or a source release? Anything so I know how to use your creation? I’d also appreciate a “not soon” if that’s the case so I can go out and learn to do this myself if I have to. Thanks!

Kev had some problems with it and I was so far unable to track the cause down, because it always worked fine for me. Things like webstart throwing the muffin away on exit or being unable to delete the muffin :-/

I’m a bit puzzled since the demo application worked flawlessly on a broad range of different configurations and operating systems.

Well, you can of course toy around with last moth’s source:
http://kaioa.com/src/tools/MuffinTest4c_src.zip

If it works - great and if it doesn’t… maybe you can track down the reason. Either way let us know :wink:

I’ll do my best and let you know what I find! Thanks :slight_smile:

I have just one more question.

Do you know the Muffin Man?

LOL ;D ;D ;D