Code example for ByteArrayBuffer

Methods: byteAt

0
    	}; 
     
    public static int getPacketType(ByteArrayBuffer buf)
    {    
    	//Log.d("LTData", "getPacketType"); 
    	return ((buf.byteAt(0) & 0xe0) >> 5 & 7) | ((buf.byteAt(1) & 0x01) << 3);
    } 
    public static int getCarPacket(ByteArrayBuffer buf)
    {    
    	//Log.d("LTData", "getCarPacket"); 
        return buf.byteAt(0) & 0x1f;
    } 
    public static int getLongPacketData(ByteArrayBuffer buf)
    { 
    	//Log.d("LTData", "getLongPacketData"); 
        return 0; 
    }    
    //c 
    public static int getShortPacketData(ByteArrayBuffer buf)
    {       
    	//Log.d("LTData", "getShortPacketData");