473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Convert java Reader object into a char Array -- Need Help!!!

18
Hi all;

I hv a Reader object say;

Reader r;
r =...............;


I need this reader object to be converted into a character array.
.................................................. .................................................. .....
Can u pls give your ideas!
your help will be greatly appreciated :)

regards
madumm
Mar 26 '07 #1
2 2643
markmcgookin
648 Expert 512MB
Hi all;

I hv a Reader object say;

Reader r;
r =...............;


I need this reader object to be converted into a character array.
.................................................. .................................................. .....
Can u pls give your ideas!
your help will be greatly appreciated :)

regards
madumm
Hi there,

looks like you need a loop within your code, i.e.

convert reader data to string 'toSring()', and then loop through that string one char at a time and add that to an array (if that is what you mean) i.e.

FOR i = 0; i = myString.Length
ADD char at myString.Position[i]
TO myArray at position [i]

or something like that (NB that is pseudo code.. not actual java)
Mar 26 '07 #2
madumm
18
Hi there,

looks like you need a loop within your code, i.e.

convert reader data to string 'toSring()', and then loop through that string one char at a time and add that to an array (if that is what you mean) i.e.

FOR i = 0; i = myString.Length
ADD char at myString.Position[i]
TO myArray at position [i]

or something like that (NB that is pseudo code.. not actual java)

No it won't solve like that; anyway i tried :(
Mar 27 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: joye | last post by:
Hello, How to convert an unmanaged string with char array type to a managed string with char array type? Thanks. Regards, Tsung-Yu
2
by: Asad | last post by:
Hi, Can anyone plz tell me how to do this conversion: I have a string array str; str,str,.....str are all having strings. I just want to convert one string, say str, to characters!!!! I...
6
by: Gary Wessle | last post by:
Hi I have char buffer = "jackson"; how can I get the same effect by string name = "jackson"; char buffer = name; //will not work I tried conat_cast<char*(name.c_str());
1
by: madumm | last post by:
Hi all I really need a solution for the following:: ------------------------------------------------------------------------------------- Say i have a font object called 'myFont' as shown below;...
0
by: madumm | last post by:
Hi all; Anybody know how to convert an InputSource into a char array?? need help Thanx
1
by: madumm | last post by:
Hi all; Can anybody tell me how to convert a InputStream into a Char array?? InputStream foData; foData into a Char array?? Thanx madumm
5
by: runsun | last post by:
Thanks in advance. This program is written in C. It needs to read all characters from a file; then write them into a 3D array (yes, 3D!). The file is a .prn file (one of the Excel types), which...
4
by: JoyMassMan | last post by:
Hi, I am studying c++ in Visual c++ 2005. Please help with 2 issue. 1) How to convert String ^a to char b? 2) Are fprintf , fscanf, fwrite, fread not take any managed type string? if yes, how?...
4
by: red222 | last post by:
I am trying to find a string within a substring using strstr. This only works with char arrays. I have an array of objects of which I am searching a particular property which is a string. char...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.