byte[ ] of J/Link
- To: mathgroup at smc.vnet.net
- Subject: [mg30426] byte[ ] of J/Link
- From: "Junzo Sato" <jsato at fc.kuh.kumamoto-u.ac.jp>
- Date: Fri, 17 Aug 2001 03:10:02 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Hello. I'm trying to create byte[] with specified length from Mathematica. How to implement the following Java code in Mathematica? byte[] data = null; RandomAccessFile rf = null; try{ rf=new RandomAccessFile("myfile.data","r"); data=new byte[(int)rf.length()]; rf.readFully(data); }catch(IOException e){ e.printStackTrace(); } --- rf=JavaNew["java.io.RandomAccessFile","myfile.data","r"]; data= <???> rf@readFully[data]; Bye, Junzo ---------------------------------------- Junzo SATO Email: jsato at fc.kuh.kumamoto-u.ac.jp Department Of Medical Information Technology Kumamoto University Hospital University Of Kumamoto 1-1-1 Honjo, Kumamoto City, Kumamoto, 860-8556, JAPAN