protected Object[] parseArguments(final byte[] theBytes){
  Object[] myArguments=new Object[0];
  int myTagIndex=0;
  int myIndex=0;
  myArguments=new Object[_myTypetag.length];
  isArray=(_myTypetag.length > 0) ? true : false;
  while (myTagIndex < _myTypetag.length) {
    if (myTagIndex == 0) {
      _myArrayType=_myTypetag[myTagIndex];
    }
 else {
      if (_myTypetag[myTagIndex] != _myArrayType) {
        isArray=false;
      }
    }
switch (_myTypetag[myTagIndex]) {
case (0x63):
      myArguments[myTagIndex]=(new Character((char)(Bytes.toInt(Bytes.copy(theBytes,myIndex,4)))));
    myIndex+=4;
  break;
case (0x69):
myArguments[myTagIndex]=(new Integer(Bytes.toInt(Bytes.copy(theBytes,myIndex,4))));
myIndex+=4;
break;
case (0x66):
myArguments[myTagIndex]=(new Float(Bytes.toFloat(Bytes.copy(theBytes,myIndex,4))));
myIndex+=4;
break;
case (0x6c):
case (0x68):
myArguments[myTagIndex]=(new Long(Bytes.toLong(Bytes.copy(theBytes,myIndex,8))));
myIndex+=8;
break;
case (0x64):
myArguments[myTagIndex]=(new Double(Bytes.toDouble(Bytes.copy(theBytes,myIndex,8))));
myIndex+=8;
break;
case (0x53):
case (0x73):
int newIndex=myIndex;
StringBuffer stringBuffer=new StringBuffer();
stringLoop: do {
if (theBytes[newIndex] == 0x00) {
break stringLoop;
}
 else {
stringBuffer.append((char)theBytes[newIndex]);
}
newIndex++;
}
 while (newIndex < theBytes.length);
myArguments[myTagIndex]=(stringBuffer.toString());
myIndex=newIndex + align(newIndex);
break;
case 0x62:
int myLen=Bytes.toInt(Bytes.copy(theBytes,myIndex,4));
myIndex+=4;
myArguments[myTagIndex]=Bytes.copy(theBytes,myIndex,myLen);
myIndex+=myLen + (align(myLen) % 4);
break;
case 0x6d:
myArguments[myTagIndex]=Bytes.copy(theBytes,myIndex,4);
myIndex+=4;
break;
}
myTagIndex++;
}
_myData=Bytes.copy(_myData,0,myIndex);
return myArguments;
}

protected Object [ ] parseArguments ( final byte [ ] theBytes ) { Object [ ] myArguments = new Object [ 0 ] ; int myTagIndex = 0 ; int myIndex = 0 ; myArguments = new Object [ _myTypetag . length ] ; isArray = ( _myTypetag . length > 0 ) ? true : false ; while ( myTagIndex < _myTypetag . length ) { if ( myTagIndex == 0 ) { _myArrayType = _myTypetag [ myTagIndex ] ; } else { if ( _myTypetag [ myTagIndex ] != _myArrayType ) { isArray = false ; } } switch ( _myTypetag [ myTagIndex ] ) { case ( 0x63 ) : myArguments [ myTagIndex ] = ( new Character ( ( char ) ( Bytes . toInt ( Bytes . copy ( theBytes , myIndex , 4 ) ) ) ) ) ; myIndex += 4 ; break ; case ( 0x69 ) : myArguments [ myTagIndex ] = ( new Integer ( Bytes . toInt ( Bytes . copy ( theBytes , myIndex , 4 ) ) ) ) ; myIndex += 4 ; break ; case ( 0x66 ) : myArguments [ myTagIndex ] = ( new Float ( Bytes . toFloat ( Bytes . copy ( theBytes , myIndex , 4 ) ) ) ) ; myIndex += 4 ; break ; case ( 0x6c ) : case ( 0x68 ) : myArguments [ myTagIndex ] = ( new Long ( Bytes . toLong ( Bytes . copy ( theBytes , myIndex , 8 ) ) ) ) ; myIndex += 8 ; break ; case ( 0x64 ) : myArguments [ myTagIndex ] = ( new Double ( Bytes . toDouble ( Bytes . copy ( theBytes , myIndex , 8 ) ) ) ) ; myIndex += 8 ; break ; case ( 0x53 ) : case ( 0x73 ) : int newIndex = myIndex ; StringBuffer stringBuffer = new StringBuffer ( ) ; stringLoop : do { if ( theBytes [ newIndex ] == 0x00 ) { break stringLoop ; } else { stringBuffer . append ( ( char ) theBytes [ newIndex ] ) ; } newIndex ++ ; } while ( newIndex < theBytes . length ) ; myArguments [ myTagIndex ] = ( stringBuffer . toString ( ) ) ; myIndex = newIndex + align ( newIndex ) ; break ; case 0x62 : int myLen = Bytes . toInt ( Bytes . copy ( theBytes , myIndex , 4 ) ) ; myIndex += 4 ; myArguments [ myTagIndex ] = Bytes . copy ( theBytes , myIndex , myLen ) ; myIndex += myLen + ( align ( myLen ) % 4 ) ; break ; case 0x6d : myArguments [ myTagIndex ] = Bytes . copy ( theBytes , myIndex , 4 ) ; myIndex += 4 ; break ; } myTagIndex ++ ; } _myData = Bytes . copy ( _myData , 0 , myIndex ) ; return myArguments ; }
cast the arguments passed with the incoming osc message and store them in an object array .
