class JavaByteTest
{
	//--------------------------------------------------------------------------
	//Byte test
	
	public static byte Test(byte param)
	{
		return (byte)(255 - param);
	}

	public static byte[][][] Test3D(byte[][][] param)
	{
		int i1, i2, i3, len1, len2, len3;

		len1 = param.length;
		for (i1=0; i1<len1; i1++)
		{
			len2 = param[i1].length;
			for (i2=0; i2<len2; i2++)
			{
				len3 = param[i1][i2].length;
				for (i3=0; i3<len3; i3++)
				{
					param[i1][i2][i3] = (byte)(255 - param[i1][i2][i3]);
				}
			}
		}
		return param;
	}

	//--------------------------------------------------------------------------
	//Byte Object test

	public static Byte TestObj(Byte param)
	{
		return new Byte((byte)(255 - param.byteValue()));
	}

	public static Byte[][][] TestObj3D(Byte[][][] param)
	{
		int i1, i2, i3, len1, len2, len3;

		len1 = param.length;
		for (i1=0; i1<len1; i1++)
		{
			len2 = param[i1].length;
			for (i2=0; i2<len2; i2++)
			{
				len3 = param[i1][i2].length;
				for (i3=0; i3<len3; i3++)
				{
					param[i1][i2][i3] = new Byte((byte)(255 - param[i1][i2][i3].byteValue())); 
				}
			}
		}
		return param;
	}
}
