com.illposed.osc
Class OSCPacket

java.lang.Object
  extended bycom.illposed.osc.OSCPacket
Direct Known Subclasses:
OSCBundle, OSCMessage

public abstract class OSCPacket
extends java.lang.Object

OSCPacket is the abstract superclass for the various kinds of OSC Messages. The actual packets are:

This implementation is based on Markus Gaelli and Iannis Zannos' OSC implementation in Squeak Smalltalk.


Field Summary
protected  byte[] byteArray
           
protected  boolean isByteArrayComputed
           
 
Constructor Summary
OSCPacket()
          Default constructor for the abstract class
 
Method Summary
protected  void computeByteArray()
          Generate a representation of this packet conforming to the the OSC byte stream specification.
protected abstract  void computeByteArray(OSCJavaToByteArrayConverter stream)
          Subclasses should implement this method to product a byte array formatted according to the OSC specification.
 byte[] getByteArray()
          Return the OSC byte stream for this packet.
protected  void init()
          Run any post construction initialization.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isByteArrayComputed

protected boolean isByteArrayComputed

byteArray

protected byte[] byteArray
Constructor Detail

OSCPacket

public OSCPacket()
Default constructor for the abstract class

Method Detail

computeByteArray

protected void computeByteArray()
Generate a representation of this packet conforming to the the OSC byte stream specification. Used Internally.


computeByteArray

protected abstract void computeByteArray(OSCJavaToByteArrayConverter stream)
Subclasses should implement this method to product a byte array formatted according to the OSC specification.

Parameters:
stream - OscPacketByteArrayConverter

getByteArray

public byte[] getByteArray()
Return the OSC byte stream for this packet.

Returns:
byte[]

init

protected void init()
Run any post construction initialization. (By default, do nothing.)