org.graphstream.stream.netstream.packing
Class NetStreamPacker
java.lang.Object
org.graphstream.stream.netstream.packing.NetStreamPacker
- Direct Known Subclasses:
- Base64Packer
public abstract class NetStreamPacker
- extends Object
NetStreamPacker
public NetStreamPacker()
packMessage
public abstract ByteBuffer packMessage(ByteBuffer buffer,
int startIndex,
int endIndex)
- Pack the given ByteBuffer from startIndex to endIdex
- Parameters:
buffer
- The buffer to pack/encodestartIndex
- the index at which the encoding starts in the bufferendIndex
- the index at which the encoding stops
- Returns:
- a ByteBuffer that is the packed version of the input one. It may not have the same size.
packMessage
public ByteBuffer packMessage(ByteBuffer buffer)
- Pack the given ByteBuffer form its position to its capacity.
- Parameters:
buffer
- The buffer to pack/encode
- Returns:
- a ByteBuffer that is the packed version of the input one. It may not have the same size.
packMessageSize
public abstract ByteBuffer packMessageSize(int capacity)
- Parameters:
capacity
-
- Returns:
Copyright © 2013. All Rights Reserved.