> but read should block until you get data or you reach EOF... it shouldn't 
> return -1 if there might be anymore data...
> as -1 (End Of File) was returned that means that no more data is available.

You are probably right. I'm not that familiar with Java I/O streams' contracts.

> tried it as it is in the example and i still get the same result...
> every once in a while i get nothing back. that is the channel is closed and 
> there is no available stuff to read.

You might want to try executing a command like "sleep 1; echo Hello; sleep 1; 
echo World" just to rule out any race conditions in your code.

Otherwise, I'll have to defer to the JSch experts here.

Tobia
------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
JSch-users mailing list
JSch-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to