Timing issue, not reproducible at my environment.
Reported by Piotr, tested for fix at Piotr's environment.
apache-sshd does not flush stream nor close stream after command is executed, thus java pipe is not writing information into the reader.
solution is to flush output streams post command execution.