Package org.graphstream.stream.netstream
Class NetStreamDecoder
java.lang.Object
org.graphstream.stream.SourceBase
org.graphstream.stream.netstream.NetStreamDecoder
- All Implemented Interfaces:
ByteDecoder,Source
public class NetStreamDecoder extends SourceBase implements ByteDecoder
- Since:
- 22/01/16.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.graphstream.stream.SourceBase
SourceBase.ElementType -
Constructor Summary
Constructors Constructor Description NetStreamDecoder() -
Method Summary
Modifier and Type Method Description voiddecode(ByteBuffer bb)Decode the buffer, and dispatch the corresponding event.booleanvalidate(ByteBuffer buffer)Tells if the buffer contains an event that is ready to be dispatched.Methods inherited from class org.graphstream.stream.SourceBase
addAttributeSink, addElementSink, addSink, attributeSinks, clearAttributeSinks, clearElementSinks, clearSinks, elementSinks, removeAttributeSink, removeElementSink, removeSink, sendAttributeChangedEvent, sendAttributeChangedEvent, sendEdgeAdded, sendEdgeAdded, sendEdgeAttributeAdded, sendEdgeAttributeAdded, sendEdgeAttributeChanged, sendEdgeAttributeChanged, sendEdgeAttributeRemoved, sendEdgeAttributeRemoved, sendEdgeRemoved, sendEdgeRemoved, sendGraphAttributeAdded, sendGraphAttributeAdded, sendGraphAttributeChanged, sendGraphAttributeChanged, sendGraphAttributeRemoved, sendGraphAttributeRemoved, sendGraphCleared, sendGraphCleared, sendNodeAdded, sendNodeAdded, sendNodeAttributeAdded, sendNodeAttributeAdded, sendNodeAttributeChanged, sendNodeAttributeChanged, sendNodeAttributeRemoved, sendNodeAttributeRemoved, sendNodeRemoved, sendNodeRemoved, sendStepBegins, sendStepBeginsMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.graphstream.stream.Source
addAttributeSink, addElementSink, addSink, clearAttributeSinks, clearElementSinks, clearSinks, removeAttributeSink, removeElementSink, removeSink
-
Constructor Details
-
NetStreamDecoder
public NetStreamDecoder()
-
-
Method Details
-
validate
Description copied from interface:ByteDecoderTells if the buffer contains an event that is ready to be dispatched. The bytes considered should be from 0 to the buffer's position. The position of the buffer SHOULD NOT be changed.- Specified by:
validatein interfaceByteDecoder- Returns:
- true if the buffer contains an event
-
decode
Description copied from interface:ByteDecoderDecode the buffer, and dispatch the corresponding event.- Specified by:
decodein interfaceByteDecoder- Parameters:
bb- event as a binary buffer
-