private static final Logger LOG = LoggerFactory.getLogger(NetconfEXIToMessageDecoder.class);
-// private static final SAXTransformerFactory saxTransformerFactory = (SAXTransformerFactory)SAXTransformerFactory.newInstance();
-
private final NetconfEXICodec codec;
public NetconfEXIToMessageDecoder(final NetconfEXICodec codec) {
* the use of EXI, which means the next message needs to be decoded not by us, but rather
* by the XML decoder.
*/
- // If empty Byte buffer is passed to r.parse, EOFException is thrown
- if (in.readableBytes() == 0) {
+ // If empty Byte buffer is passed to r.parse, EOFException is thrown
+ if (in.isReadable() == false) {
LOG.debug("No more content in incoming buffer.");
return;
}
final DOMResult domResult = new DOMResult();
handler.setResult(domResult);
-
try (final InputStream is = new ByteBufInputStream(in)) {
r.parse(new InputSource(is));
}