Chris,

The warning you mentionned at the end has already been reported and will be
fixed in the next release.

With regards to your first question, it's actually a very interesting
problem.  Presently, Perl filehandles are not automatically mapped to Java
Streams.

The only thing I can think of right now is using a byte array:

  method(byte buf[]) ;

and using unpack to create a Perl list:

  my @bytes = unpack("C*", $in) ;
  $this->method([EMAIL PROTECTED]) ;

This is pretty inefficient but I think it should work.

I'll keep thinking about it, and let me know if you find anything or if
this works for you.

Patrick


> Hello
>
> I have a perl cgi script that reads some binary data from STDIN. It does
> it like this:
>
> binmode STDIN;
> read(STDIN, $in, $ENV{'CONTENT_LENGTH'});
>
> I have some Inline Java code  a couple of methiclass. I would like to
> pass that binary data ($in) to a Java method. How is this done ? DO I
> need some kind of InputStream ? I have tried this, as well as
> DataInputStream
>
> method (java.io.InputStream is )
>
> but in my error log I see a message "Can't convert" which is not a
> message anywhere in my class. I know that there is data in $in because I
> have written out out to a binary file.
>
> How can I pass the data ?
>
> One other small thing, when I run with perl -w, I see this:
>
> [Sat Jan 17 23:54:46 2004] [error] [client 192.168.1.10] v-string in
> use/require non-portable at
> /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Inline/Java.pm
> line 9.
>
> Line 9 simply is an import of java.util.Date
>
> use Inline Java => <<'END_OF_JAVA_CODE',DIRECTORY => '/tmp/Inline' ;
> import java.io.*;
> import java.util.*;
> import java.util.Date;
> import java.text.*;
>
> Thanks
>
>
> Chris
>
>
>

Reply via email to