org.graphstream.stream.netstream.packing
Class Base64Unpacker
java.lang.Object
org.graphstream.stream.netstream.packing.NetStreamUnpacker
org.graphstream.stream.netstream.packing.Base64Unpacker
public class Base64Unpacker
- extends NetStreamUnpacker
Method Summary |
static void |
main(String[] args)
|
int |
sizeOfInt()
An unpacker has to be abble to indicated what is the size of an int after being packed. |
ByteBuffer |
unpackMessage(ByteBuffer buffer,
int startIndex,
int endIndex)
Unpack the given ByteBuffer from startIndex to endIdex |
int |
unpackMessageSize(ByteBuffer buffer)
Unpacks the data necessary to decode a 4 bytes integer that indicates the size of the following message. |
Base64Unpacker
public Base64Unpacker()
unpackMessage
public ByteBuffer unpackMessage(ByteBuffer buffer,
int startIndex,
int endIndex)
- Description copied from class:
NetStreamUnpacker
- Unpack the given ByteBuffer from startIndex to endIdex
- Specified by:
unpackMessage
in class NetStreamUnpacker
- Parameters:
buffer
- The buffer to unpack/decodestartIndex
- the index at which the decoding starts in the bufferendIndex
- the index at which the decoding stops
- Returns:
- a ByteBuffer that is the unpacked version of the input one. It may not have the same size.
unpackMessageSize
public int unpackMessageSize(ByteBuffer buffer)
- Description copied from class:
NetStreamUnpacker
- Unpacks the data necessary to decode a 4 bytes integer that indicates the size of the following message.
The given buffer's position may be important for the unpacker to work. This method may also change the given bytebuffer's position attribute.
- Specified by:
unpackMessageSize
in class NetStreamUnpacker
- Parameters:
buffer
- The byteBuffer who's content has the encoded value of the needed size integer.
- Returns:
main
public static void main(String[] args)
sizeOfInt
public int sizeOfInt()
- Description copied from class:
NetStreamUnpacker
- An unpacker has to be abble to indicated what is the size of an int after being packed.
- Specified by:
sizeOfInt
in class NetStreamUnpacker
- Returns:
Copyright © 2013. All Rights Reserved.