× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



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 thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.