AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Simple type conversion question

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help
View previous topic :: View next topic  
Author Message
Dfenestr8
Guest





PostPosted: Tue Sep 28, 2004 8:24 pm    Post subject: Simple type conversion question Reply with quote



How do I convert a sequence of variables of type int to a String?



Back to top
Bryce
Guest





PostPosted: Tue Sep 28, 2004 8:38 pm    Post subject: Re: Simple type conversion question Reply with quote



On Wed, 29 Sep 2004 05:24:00 +0900, Dfenestr8
<chrisdewinN0SPAM (AT) yahoo (DOT) com.au> wrote:

Quote:
How do I convert a sequence of variables of type int to a String?
[url]http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html#valueOf(int)[/url]


String intString = String.valueOf(intValue);

--
now with more cowbell

Back to top
Tony Morris
Guest





PostPosted: Tue Sep 28, 2004 11:41 pm    Post subject: Re: Simple type conversion question Reply with quote



You don't "convert a sequence of variables of type int to a String" without
providing proper context.

Since you didn't state your problem clearly, assumptions must be made.
You're reading off a java.io.InputStream using the read() method and wish to
convert the raw data to a String.
You do this by using a java.io.InputStreamReader to convert the raw data to
character data.
Then you might consider writing the character data to a java.io.StringWriter
or a java.lang.StringBuffer.

If this assumption is incorrect, state your problem clearly.

--
Tony Morris
http://xdweb.net/~dibblego/


Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.