public int input(byte[] bytes, int offset, int size)
{
int bytesConsumed = Proton.pn_transport_input(_impl, ByteBuffer.wrap(bytes, offset, size));
if(bytesConsumed == Proton.PN_ERR)
{
SWIGTYPE_p_pn_error_t err = Proton.pn_transport_error(_impl);
String errorText = Proton.pn_error_text(err);
Proton.pn_error_clear(err);
throw new TransportException(errorText);
}
else if (bytesConsumed == Proton.PN_EOS)