예제 #1
0
        /**
         * Creates a buffer
         * @param capacity
         * @return
         */
        public static LuaBuffer Create(int capacity)
        {
            LuaBuffer lb = new LuaBuffer();

            lb.buffer = new byte[capacity];
            return(lb);
        }
예제 #2
0
        public void Write(LuaBuffer bufferO, Int32 offset, Int32 length)
        {
            if (type == INPUTSTREAM)
            {
                Log.e("LuaStream.java", "Tried to write input stream.");
                return;
            }

            byte[] buffer = bufferO.GetBuffer();

            try
            {
                stream.Write(buffer, offset, length);
            }
            catch (Exception e)
            {
                Tools.LogException("LuaStream.java", e);
            }
        }