com.illposed.osc
Class OSCBundle

java.lang.Object
  extended by com.illposed.osc.OSCPacket
      extended by com.illposed.osc.OSCBundle

public class OSCBundle
extends OSCPacket

The Class OSCBundle.


Field Summary
static java.math.BigInteger SECONDS_FROM_1900_to_1970
          The Constant SECONDS_FROM_1900_to_1970.
 
Constructor Summary
OSCBundle()
          Create a new OSCBundle, with a timestamp of now.
OSCBundle(java.util.Date timestamp)
          Create an OSCBundle with the specified timestamp.
OSCBundle(OSCPacket[] newPackets)
          Instantiates a new OSC bundle.
OSCBundle(OSCPacket[] newPackets, java.util.Date newTimestamp)
          Instantiates a new OSC bundle.
 
Method Summary
 void addPacket(OSCPacket packet)
          Add a packet to the list of packets in this bundle.
 OSCPacket[] getPackets()
          Get the packets contained in this bundle.
 java.util.Date getTimestamp()
          Return the timestamp for this bundle.
 void setTimestamp(java.util.Date timestamp)
          Set the timestamp for this bundle.
 
Methods inherited from class com.illposed.osc.OSCPacket
getByteArray
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SECONDS_FROM_1900_to_1970

public static final java.math.BigInteger SECONDS_FROM_1900_to_1970
The Constant SECONDS_FROM_1900_to_1970.

Constructor Detail

OSCBundle

public OSCBundle()
Create a new OSCBundle, with a timestamp of now. You can add packets to the bundle with addPacket()


OSCBundle

public OSCBundle(java.util.Date timestamp)
Create an OSCBundle with the specified timestamp.

Parameters:
timestamp - the timestamp

OSCBundle

public OSCBundle(OSCPacket[] newPackets)
Instantiates a new OSC bundle.

Parameters:
newPackets - Array of OSCPackets to initialize this object with

OSCBundle

public OSCBundle(OSCPacket[] newPackets,
                 java.util.Date newTimestamp)
Instantiates a new OSC bundle.

Parameters:
newPackets - OscPacket[]
newTimestamp - the new timestamp
Method Detail

addPacket

public void addPacket(OSCPacket packet)
Add a packet to the list of packets in this bundle.

Parameters:
packet - the packet

getPackets

public OSCPacket[] getPackets()
Get the packets contained in this bundle.

Returns:
an array of packets

getTimestamp

public java.util.Date getTimestamp()
Return the timestamp for this bundle.

Returns:
a Date

setTimestamp

public void setTimestamp(java.util.Date timestamp)
Set the timestamp for this bundle.

Parameters:
timestamp - the new timestamp