[2697] in java-interest

home help back first fref pref prev next nref lref last post

Dealing with byte[]s

daemon@ATHENA.MIT.EDU (Michael Afergan)
Tue Oct 10 23:04:32 1995

From: mikea@ai.mit.edu (Michael Afergan)
Date: Tue, 10 Oct 1995 21:13:19 -0400
To: hotjava-interest@java.sun.com, java-interest@java.sun.com

	Where do bytes fit into the general Java scheme of things?
They're not even defined under java.lang.  Where did their need come
from?

	Basically, I have two very related problems:

	I'm reading some info from a InputStream and want to treat the
info as a String.  How can I convert one to the other?

	Furthermore, if for testing purposes I wish to explicitly
create an array of bytes, what is the syntax?  I declare it at the top
of my program.  How do I allocate memory for it?  (I assume: line =
new byte[123].)  More importantly, how do I specify its contents?

	Thanks,
	-- Mike
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post