Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2001
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

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



  • Prev by Date: Effect of changing chip on MathPass/MacineID
  • Next by Date: Re: Date calculating software?
  • Previous by thread: Re: Effect of changing chip on MathPass/MacineID
  • Next by thread: Re: byte[ ] of J/Link