view core/src/luan/modules/BinaryLuan.java @ 302:2f8938fc518c

fix modules Binary and Html git-svn-id: https://luan-java.googlecode.com/svn/trunk@303 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Thu, 18 Dec 2014 04:56:30 +0000
parents ec016471c6eb
children 5e7450ac27f2
line wrap: on
line source

package luan.modules;

import luan.Luan;
import luan.LuanState;
import luan.LuanTable;
import luan.LuanFunction;
import luan.LuanException;
import luan.LuanMethod;


public final class BinaryLuan {

	@LuanMethod public static byte[] pack(byte... bytes) {
		return bytes;
	}

	@LuanMethod public static Byte[] unpack(byte[] binary) {
		Byte[] bytes = new Byte[binary.length];
		for( int i=0; i<binary.length; i++ ) {
			bytes[i] = binary[i];
		}
		return bytes;
	}

}