org.graphstream.stream.netstream.packing
Class Base64Unpacker

java.lang.Object
  extended by org.graphstream.stream.netstream.packing.NetStreamUnpacker
      extended by org.graphstream.stream.netstream.packing.Base64Unpacker

public class Base64Unpacker
extends NetStreamUnpacker


Constructor Summary
Base64Unpacker()
           
 
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.
 
Methods inherited from class org.graphstream.stream.netstream.packing.NetStreamUnpacker
unpackMessage
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Base64Unpacker

public Base64Unpacker()
Method Detail

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/decode
startIndex - the index at which the decoding starts in the buffer
endIndex - 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.