I just started tinkering with creating a DigestInStream class as part of some possible future Fantom crypto pod, and ran into an issue where I'd like to make use of some of the utility methods on the java sys::Buf object.
The method in question is:
abstract long pipeFrom(InputStream src, long len) throws IOException;
but it's not declared public. Any hints on how to work around this with java code from another package? Thanks!
brianTue 5 Jan 2010
Now you see the pain I had to suffer to uniform all of Java's disparate IO APIs :-)
I pushed a changeset to make them public.
Just a note: I don't really consider any of the Java (or C#/JS) support APIs as part of the official, public API. So when we finally do an API lock down for 1.0, I think we need to leave open the possibility that the Java/C#/JS implementation code might change between releases.
liamstaskTue 5 Jan 2010
And I'm definitely grateful :) The current IO design in Fantom is super nice, and has made some of the things I'm working on downright trivial. I forget whether you've mentioned if you have plans for any async IO support eventually - would be quite a feat to wrap that into the same design.
Sounds reasonable to me that the support APIs could change more frequently than the public ones. As long as they don't go away altogether, it's easy enough to update.
brianTue 5 Jan 2010
I forget whether you've mentioned if you have plans for any async IO support eventually
I would definitely like to async APIs at some point, just not sure how they should work into Actor/Future model
liamstask Tue 5 Jan 2010
I just started tinkering with creating a DigestInStream class as part of some possible future Fantom crypto pod, and ran into an issue where I'd like to make use of some of the utility methods on the java sys::Buf object.
The method in question is:
but it's not declared public. Any hints on how to work around this with java code from another package? Thanks!
brian Tue 5 Jan 2010
Now you see the pain I had to suffer to uniform all of Java's disparate IO APIs :-)
I pushed a changeset to make them public.
Just a note: I don't really consider any of the Java (or C#/JS) support APIs as part of the official, public API. So when we finally do an API lock down for 1.0, I think we need to leave open the possibility that the Java/C#/JS implementation code might change between releases.
liamstask Tue 5 Jan 2010
And I'm definitely grateful :) The current IO design in Fantom is super nice, and has made some of the things I'm working on downright trivial. I forget whether you've mentioned if you have plans for any async IO support eventually - would be quite a feat to wrap that into the same design.
Sounds reasonable to me that the support APIs could change more frequently than the public ones. As long as they don't go away altogether, it's easy enough to update.
brian Tue 5 Jan 2010
I would definitely like to async APIs at some point, just not sure how they should work into Actor/Future model