|
From: <php...@li...> - 2007-08-27 13:05:43
|
Last night, I discovered that I needed to use java_values() on the byte =
array before it was comparable to the original data, i.e.
$file =3D file_get_contents('foo.pdf');
$javaObject->setData($file);
$output =3D $javaObject->getData();
strcmp($file, java_values($output)); // wrapped $output in =
java_values()
Otherwise, it would try to compare $file to =
[[o:array_of_B]:"[B@1c3ee45"].
Thanks for prodding me in the right direction.
Best,
Jonathan
> -----Original Message-----
> From: php...@li...=20
> [mailto:php...@li...]=20
> On Behalf Of php...@li...
> Sent: Saturday, August 25, 2007 7:17 AM
> To: php...@li...
> Subject: Re: [Php-java-bridge-users] Bytes are getting=20
> mistranslated somewhere
>=20
> Hi Jonathan,
>=20
> > $javaObject->setData($file);
> > $output =3D $javaObject->getData();
> > strcmp($file, $output);
> > =09
> > And the bytes coming out of the getData() method are=20
> different from the
> > bytes going into the setData() method. =20
>=20
> there's a test case (tests.php5/binaryData.php) which checks this.=20
>=20
> Can you please check if $file and $output have the same type=20
> and, if that's the case, please set
> the log level to 4 or above, open a new ticket (please use
> http://sourceforge.net/tracker/?func=3Dadd&group_id=3D117793&atid=3D
> 679233) and attach the log at the
> end of that ticket. We'll look at this issue asap.
>=20
>=20
> Regards,
> Jost Boekemeier
>=20
>=20
>=20
>=20
>=20
> Wissenswertes f=FCr Bastler und Hobby Handwerker. BE A=20
> BETTER HEIMWERKER! www.yahoo.de/clever
>=20
> --------------------------------------------------------------
> -----------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and=20
> a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> php-java-bridge-users mailing list
> php...@li...
> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
>=20
>=20
|