cgl.narada.transport.udp
Class UDPBigPackageHandler

java.lang.Object
  extended by cgl.narada.transport.udp.UDPBigPackageHandler

public class UDPBigPackageHandler
extends Object

Title: UDPBigPackageHandler

Description: This file helps to send the bytes bigger than 64KB

Version:
1.0

Constructor Summary
UDPBigPackageHandler()
          Constructor
 
Method Summary
 byte[] composePackage(Vector pvector)
          Composes a package to send
 Vector createSmallPackVector(byte[] data)
          Receives a big chunk of byte and devides it to smaller than 64 KB byte arrays
 void initReceiver(boolean debug)
          Initilize parameters for receiver
 void initSender(boolean debug)
          Initilize parameters for sender
static void main(String[] args)
           
 byte[] receivedPackages(byte[] dataRecv)
          Handles received packages, combines small packages
 void shutdownServices()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UDPBigPackageHandler

public UDPBigPackageHandler()
Constructor

Method Detail

shutdownServices

public void shutdownServices()

initReceiver

public void initReceiver(boolean debug)
Initilize parameters for receiver

Parameters:
debug - passed debugging parameter

initSender

public void initSender(boolean debug)
Initilize parameters for sender

Parameters:
debug - passed debugging parameter

createSmallPackVector

public Vector createSmallPackVector(byte[] data)
Receives a big chunk of byte and devides it to smaller than 64 KB byte arrays

Parameters:
data - received big chunk
Returns:
vector of smaller bytes

composePackage

public byte[] composePackage(Vector pvector)
Composes a package to send

Parameters:
pvector - Receives a vector of bytes
Returns:
a package ready to send

receivedPackages

public byte[] receivedPackages(byte[] dataRecv)
Handles received packages, combines small packages

Parameters:
dataRecv - Received package
Returns:
byte array

main

public static void main(String[] args)


For comments and suggestions please send e-mail to The NaradaBrokering Project