* @param p the offset within data to start writing
	 * @return the number of serialised bytes
	 */
	private int serialiseVersions( byte[] data, int p ) throws Exception
	{
		int oldP = p;
		if ( p + versionTableSize < data.length )
		{
			if ( versions.size() < 0 )
				throw new MVDException( "at least one version needed" );
			writeShort( data, p, (short)versions.size() );
			p += 2;
			writeShort( data, p, (short)versionSetSize );
			p += 2;
			for ( int i=0;i<versions.size();i++ )
			{
				Version v = versions.get( i );
				v.serialise( data, p );
				p += v.dataSize();
			}
		}
		else
			throw new MVDException( "No room for group table" );
		return p - oldP;
	}