当前位置:编程学习 > wap >>

JAVA翻译成Objective-C

int index = 128 * (col - cGroup) + (row - rGroup);
FileInputStream isBundlx = new FileInputStream(bundlxFileName);
isBundlx.skip(16 + 5 * index);
byte[] buffer = new byte[5];
isBundlx.read(buffer);
long offset = (long) (buffer[0] & 0xff) + (long) (buffer[1] & 0xff)
* 256 + (long) (buffer[2] & 0xff) * 65536
+ (long) (buffer[3] & 0xff) * 16777216
+ (long) (buffer[4] & 0xff) * 4294967296L;

FileInputStream isBundle = new FileInputStream(bundleFileName);
isBundle.skip(offset);
byte[] lengthBytes = new byte[4];
isBundle.read(lengthBytes);
int length = (int) (lengthBytes[0] & 0xff)
+ (int) (lengthBytes[1] & 0xff) * 256
+ (int) (lengthBytes[2] & 0xff) * 65536
+ (int) (lengthBytes[3] & 0xff) * 16777216;
result = new byte[length];
isBundle.read(result);


上面这段用Objective-C应该怎么写啊 --------------------编程问答-------------------- 这不已经很oc了嘛。。这些个方法哪里java了。。有个工具叫做J2ObjC,你可以试试
补充:移动开发 ,  iPhone
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,