udt.packets
Class PacketFactory

java.lang.Object
  extended by udt.packets.PacketFactory

public class PacketFactory
extends Object


Constructor Summary
PacketFactory()
           
 
Method Summary
static ControlPacket createControlPacket(byte[] encodedData, int length)
          create the right type of control packet based on the packet data
static UDTPacket createPacket(byte[] encodedData)
          creates a Control or Data packet depending on the highest bit of the first 32 bit of data
static UDTPacket createPacket(byte[] encodedData, int length)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PacketFactory

public PacketFactory()
Method Detail

createPacket

public static UDTPacket createPacket(byte[] encodedData)
creates a Control or Data packet depending on the highest bit of the first 32 bit of data

Parameters:
packetData -
Returns:

createPacket

public static UDTPacket createPacket(byte[] encodedData,
                                     int length)

createControlPacket

public static ControlPacket createControlPacket(byte[] encodedData,
                                                int length)
create the right type of control packet based on the packet data

Parameters:
packetData -
Returns:


Copyright © 2013 LittleShoot. All Rights Reserved.