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



Hi,
I redefined parameter as an integer 3I-0 array (Should stop the conversion) and 
sent buffer length as a parameter(instead of varying dimension array) but when 
I call very simple class to do the unzip part, I'm still getting the same 
exception (java.io.IOException: Not in GZIP format)

zData is an ASCII data zipped with GZIP)
Any idea what could be wrong now?

Oleg.

D  L              S             10I 0
D  offset         S             10I 0
D  length         S             10I 0

D                 DS
D zData
D   zDataAr                      3I 0 DIM(9957) OVERLAY(zData) INZ

D unzip           PR              O   CLASS(*JAVA:'java.lang.String')
D                                     EXTPROC(*JAVA:'UnZipString':
D                                     'unzip')
D                                     STATIC
D                                3I 0 DIM(9957)
D  offset                       10I 0 VALUE
D  length                       10I 0 VALUE

/Free
    Chain key MFPAGDTAR;
    L = %LEN(zData);
    outStringCls  = unzip(zDataAr:0:L);




        public static String unzip(byte[] ba, int offset, int length)
        {
                int b;
                int i = 0;
                CharArrayWriter w = new CharArrayWriter();
                try
                {
                        ByteArrayInputStream is = new ByteArrayInputStream(ba, 
offset, length);
                        GZIPInputStream iz = new GZIPInputStream(is);
// the rest of the code ...



-----Original Message-----
From: Barbara Morris [mailto:bmorris@ca.ibm.com]
Sent: Thursday, September 26, 2002 2:32 PM
To: java400-l@midrange.com
Subject: Re: Instantiating same class from java or rpg program


I think you're running into the same problem that DReid is having with
RPG automatically doing a CCSID conversion from the job CCSID to ASCII.
Since your data is already ASCII, this won't work.  See my reply to DReid.






The information transmitted by the following E-Mail is intended only for the 
addressee and may contain confidential and/or privileged material. Any 
interception, review, retransmission, dissemination, or other use, or taking 
any action upon this information by persons or entities other than the intended 
recipient is prohibited by law and may subject them to criminal or civil 
liability. If you received this communication in error, please contact us 
immediately at 954-730-2900 ext. 7400 and delete the communication from any 
computer or network system.




As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.