net.named_data.jndn.encoding
public class ElementReader extends Object
Constructor and Description |
---|
ElementReader(ElementListener elementListener)
Create a new ElementReader with the elementListener.
|
Modifier and Type | Method and Description |
---|---|
void |
onReceivedData(ByteBuffer data)
Continue to read data until the end of an element, then call
elementListener.onReceivedElement(element ).
|
public ElementReader(ElementListener elementListener)
elementListener
- The ElementListener used by onReceivedData.public void onReceivedData(ByteBuffer data) throws EncodingException
data
- The input data containing bytes of the element to read.
This reads from position() to limit(), but does not change the position.EncodingException
- For invalid encoding.Copyright © 2016. All rights reserved.