public abstract class NetStreamPacker extends Object
Constructor and Description |
---|
NetStreamPacker() |
Modifier and Type | Method and Description |
---|---|
ByteBuffer |
packMessage(ByteBuffer buffer)
Pack the given ByteBuffer form its position to its capacity.
|
abstract ByteBuffer |
packMessage(ByteBuffer buffer,
int startIndex,
int endIndex)
Pack the given ByteBuffer from startIndex to endIdex
|
abstract ByteBuffer |
packMessageSize(int capacity) |
public abstract ByteBuffer packMessage(ByteBuffer buffer, int startIndex, int endIndex)
buffer
- The buffer to pack/encodestartIndex
- the index at which the encoding starts in the bufferendIndex
- the index at which the encoding stopspublic ByteBuffer packMessage(ByteBuffer buffer)
buffer
- The buffer to pack/encodepublic abstract ByteBuffer packMessageSize(int capacity)
capacity
- Copyright © 2015. All rights reserved.