|
Scott,
When I included the InputStream parameter in the definition, the
compiler tells me that there are fewer parameters than the definitions
calls for. What is the assumed parameter that I need to pass it?
My C specs are:
c eval logoimage = new_String('/mr0473/logo.jpg')
c eval InputStream =
new_FileInputStream(logoimage)
c eval picarray = toByteArray(InputStream)
Now I am getting more confused. If I define it without the InputStream,
I can call it as I have before. If I define the InputStream as part of
the definition, then I don't know what to use as the assumed parameter.
This is suppose to create an object. What parameter is there that I need
to pass it?
Thanks,
Marvin
------------------------------
message: 2
date: Tue, 26 Oct 2010 19:19:03 -0500
from: Scott Klement<rpg400-l@xxxxxxxxxxxxxxxx>
subject: Re: Problem in defining a Java method for RPG/ILE
You appear to have forgotten the InputStream parameter.
On 10/26/2010 6:12 PM, Marvin Radding wrote:
I am trying to put a picture into a Excel spreadsheet using the POI
classes.
The method I am having problems with is toByteArray. This method is
defined:
public static byte[] toByteArray(InputStream stream)
I have defined it in RPG/ILE as
D toByteArray...
D pr 4096a
D extproc(*java
D :'org.apache.poi.util.IOUtils'
D :'toByteArray')
When I execute the program, I get a
Java exception received when calling Java method.
Which expands to
Message . . . . : Java exception received when calling Java method.
Cause . . . . . : RPG procedure SETUP_ANP_ in program MR0473/AHM190R
received Java exception "java.lang.NoSuchMethodError: toByteArray"
when
calling method "toByteArray" with signature "()[B" in class
"org.apache.poi.util.IOUtils".
I think this means that I have not defined the method properly in the
RPG/ILE but I am at a loss as to how to define it so the signature
matches. Does anyone have any idea what I need to do so it matches?
HELP!
Marvin
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.