using System;

namespace Plugins.JNGame.Util
{
    public class ToUtil
    {
        public static int Byte4ToInt(byte[] data)
        {
            return BitConverter.ToInt32(data, 0);  
        }

        public static byte[] IntToByte4(int value)
        {
            byte[] result = new byte[4];  
            BitConverter.GetBytes(value).CopyTo(result, 0);  
            return result;  
        }
    }
}