×
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.
Good morning.
I am creating a client socket and do not manage to read the
inputStreamReader.
Even the line "Eval String3 = readIb(ib)" works perfectly.
Some solution?? Thank you.
IBUFFERED
d newBUFFERED PR O ExtProc(*JAVA:
d 'java.io.BufferedReader':
d *CONSTRUCTOR)
d
Class(*JAVA:'java.io.BufferedReader')
d ib O
d Class(*JAVA:'java.io.Reader')
**********************************************************************
d readIb PR O ExtProc(*JAVA:
d 'java.io.BufferedReader':
d 'read')
d Class(*JAVA:'java.lang.String')
**********************************************************************
d readIbLine PR O ExtProc(*JAVA:
d 'java.io.BufferedReader':
d 'readLine')
d Class(*JAVA:'java.lang.String')
**********************************************************************
d closeIB PR ExtProc(*JAVA:
d 'java.io.BufferedReader':
d 'close')
h DftActGrp(*NO) ActGrp(*CALLER)
h thread(*serialize)
/Copy *libl/QRPGLESRC,MATHPR
/Copy *libl/QRPGLESRC,SOCKPR
/Copy *libl/QRPGLESRC,OSTREAMPR
/Copy *libl/QRPGLESRC,ISTREAMPR
/Copy *libl/QRPGLESRC,IBUFFERED
/Copy *libl/QRPGLESRC,ISTREAMBF
d IPadr c Const('10.232.1.40')
d Messa c Const('253')
d Port s 10I 0
*
d tmpIS s O
d
Class(*JAVA:'java.io.InputStream')
d tmpISR s O
d Class(*JAVA:'java.io.Input +
d
StreamReader')
d tmpOS s O
d
Class(*JAVA:'java.io.OutputStream')
d tmpBR s O
d
Class(*JAVA:'java.io.BufferedReader')
d string1 s O
d Class(*JAVA:'java.lang.String')
d string2 s O
d Class(*JAVA:'java.lang.String')
d string3 s O
d Class(*JAVA:'java.lang.String')
d Byte0 s O
d Class(*JAVA:'java.lang.Byte')
d Byte1 s O
d Class(*JAVA:'java.lang.Byte')
d Byte2 s O
d Class(*JAVA:'java.lang.Byte')
d ByteSend s O
d Class(*JAVA:'java.lang.Byte')
d Sum s O
d
Class(*JAVA:'java.math.BigDecimal')
d BigD1 s O
d
Class(*JAVA:'java.math.BigDecimal')
d BigD2 s O
d
Class(*JAVA:'java.math.BigDecimal')
d StringSum s O
d Class(*JAVA:'java.lang.String')
d Integer s O
d Class(*JAVA:'java.lang.Integer')
d Char s O
d
Class(*JAVA:'java.lang.Character')
d Display s 30A Varying
****************************
d Sock1 s O
d Class(*JAVA:'java.net.Socket')
*
d is s O Class(*JAVA:
d 'java.io.InputDataStream')
*
d ids s O Class(*JAVA:
d 'java.io.InputDataStream')
*
d os s O Class(*JAVA:
d 'java.io.OutputDataStream')
*
d ir s O Class(*JAVA:
d 'java.io.BufferedReader')
*
d ib s O Class(*JAVA:
d 'java.io.Reader')
*
d isb s O Class(*JAVA:
d 'java.io.InputStreamReader')
*
****************************
c Eval String1 = newString(IPadr)
c Eval String2 = newString(Messa)
c Z-add 10001 Port
c Eval Sock1 = newSocket(String1 : Port)
c* Eval Display = getBytes(String2)
*
*/free
* monitor;
* tmpOS=getOutput(Sock1);
* tmpBR=getInput(Sock1);
* os=newOSTREAM(tmpOS);
* writeBytes(os : String2);
* ib=newINSTREAMBF(tmpBR);
* ir=newBUFFERED(ib);
* on-error *all;
* endmon;
*/end-free
*
c* Display Dsply
*
c Eval tmpOS=getOutput(Sock1)
c Eval tmpIS=getInput(Sock1)
c Eval os=newOSTREAM(tmpOS)
c CallP writeBytes(os : String2)
c Eval isb=newINSTREAMBF(tmpIS)
c Eval ib=newBUFFERED(isb)
*
c Eval String3 = readIb(ib)
c Eval Display = getBytes(String3)
c Display Dsply
*
c CallP closeOS(os)
c CallP closeIB(ib)
c CallP closeSocket(Sock1)
c Eval *InLr = *On
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
copyright@midrange.com.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.