|
From: <php...@li...> - 2009-01-11 17:48:32
|
Hi Jost, Thanks for the information. I added a statement: echo java_inspect($reportBody); And this is what I saw in my output: -------------------- [class [B: Constructors: Fields: Methods: public native int java.lang.Object.hashCode() public final native java.lang.Class java.lang.Object.getClass() public final native void java.lang.Object.wait(long) throws java.lang.InterruptedException public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException public final void java.lang.Object.wait() throws java.lang.InterruptedException public boolean java.lang.Object.equals(java.lang.Object) public java.lang.String java.lang.Object.toString() public final native void java.lang.Object.notify() public final native void java.lang.Object.notifyAll() Classes: ] -------------------- To my untrained eye, that looks like the methods and fields of a plain old java object, not an array of bytes. I then just made the call to java_values explicit: $reportBody = java_values($reportBody); and the file was saved as expected. Thanks again for your help! Dan On 1/9/2009 8:15 AM, php...@li... wrote: > Hi, > >> [[o:array_of_B]:"[B@3a0b2771"] > > it is an array of class B (whatever B is) rather than a byte array or a String. Please see: > > echo java_inspect($javaObject); > > for details. > > You can convert any java object to a string using java_cast($obj, "S") provided it contains a toString() method. Please see the PHP/Java Bridge API for details: http://php-java-bridge.sourceforge.net/pjb/docs/php-api/index.html > > > Regards, > Jost Boekemeier > > > > > > > ------------------------------------------------------------------------------ > Check out the new SourceForge.net Marketplace. > It is the best place to buy or sell services for > just about anything Open Source. > http://p.sf.net/sfu/Xq1LFB > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |