eclipse / paho.mqtt.java

Eclipse Paho Java MQTT client library. Paho is an Eclipse IoT project.
https://eclipse.org/paho
Other
2.1k stars 880 forks source link

Discussion: Could MqttWireMessage.createWireMessage(InputStream) be public ? #991

Open juancarrey opened 1 year ago

juancarrey commented 1 year ago

This is not a bug issue

Apologies in advance if this is not the way to open a discussion.

The question is simple, could the method be exposed public: https://github.com/eclipse/paho.mqtt.java/blob/master/org.eclipse.paho.mqttv5.client/src/main/java/org/eclipse/paho/mqttv5/common/packet/MqttWireMessage.java#L201

or is there a specific need for it to be a ByteArrayInputStream ?

This would prevent needing to read the stream into a byte[] in order to read it again to parse the message, so it could be directly read from the original stream instead.

What do you think ? Thank you