I'm running Java code in python using PY4J (http://py4j.sourceforge.net/).
My java function returns an InputStream and I would like to manipulate it in my python code:
Java code:
public InputStream getPCAP(key) {
InputStream inputStream = cyberStore.getPCAP(pcapStringKey);
return inputStream;
}
Python code:
from py4j.java_gateway import JavaGateway
gateway = JavaGateway()
input_stream = PY4J_GateWay.getPCAP(key);
...
How can I get the InputStream in python?
Should I convert it to something else in the java code before returning it to python?