[android-beginners] Re: easy stuff please reply

2009-09-04 Thread Nicholas Radford
are you sure it's not just writing it out in unicode, and what ever your
using to read it is reading it in ascii?

Unicode characters take up two bytes. Typically most normal characters only
set one of the two so you'll end up (90% of the time) with hex values like
this: 44 00, which in certain text editors would appear as A  (without the
quotes). I'm only taking a guess, but it may be worth opening up the file in
a hex editor. if it's truely spaces, if it is spaces as you seem to think
you'll be finding the hex value 20 (decimal 32) in place of the 00's I'm
predicting.

2009/9/4 Jack Ha jack...@t-mobile.com


 Have you tried using PrintWriter?

 --
 Jack Ha
 Open Source Development Center
 ・T・ ・ ・Mobile・ stick together
 The coverage you need at the price you want

 The views, opinions and statements in this email are those of
 the author solely in their individual capacity, and do not
 necessarily represent those of T-Mobile USA, Inc.

 On Sep 3, 9:33 pm, kapnk...@gmail.com wrote:
  i checked this but it takes string as a parameter but write as a
 charactor
  only in the file.so again space is there.
 
  On Thu, Sep 3, 2009 at 7:35 PM, Justin Anderson janderson@gmail.com
 wrote:
 
   Why not use one of the methods from OutputStreamWriter that takes a
 string
   as a parameter?
  http://developer.android.com/reference/java/io/OutputStreamWriter.html
 
   --
   There are only 10 types of people in the world...
   Those who know binary and those who don't.
   --
 
   On Thu, Sep 3, 2009 at 6:15 AM, kapil.k kapnk...@gmail.com wrote:
 
   hello guys i am writing the data in text file with help of
 
fos = new FileOutputStream(file);
 out1 =new OutputStreamWriter(fos);
 out=new DataOutputStream(fos);
 String Dpass = new String (1008);
 
 out.writeChars(Dpass);
 
   but in file due to char it is leaving space after each charactor.so
   how should i store so the will be no sapce.
 
   also which api should i used to delete containt of the file?
 
   thank you
 
 
 



-- 
Nik Radford

Mobile: 07884 254 866
Email: nikradf...@googlemail.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Beginners group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: easy stuff please reply

2009-09-03 Thread Justin Anderson
Why not use one of the methods from OutputStreamWriter that takes a string
as a parameter?
http://developer.android.com/reference/java/io/OutputStreamWriter.html

--
There are only 10 types of people in the world...
Those who know binary and those who don't.
--


On Thu, Sep 3, 2009 at 6:15 AM, kapil.k kapnk...@gmail.com wrote:


 hello guys i am writing the data in text file with help of

  fos = new FileOutputStream(file);
   out1 =new OutputStreamWriter(fos);
   out=new DataOutputStream(fos);
   String Dpass = new String (1008);

   out.writeChars(Dpass);

 but in file due to char it is leaving space after each charactor.so
 how should i store so the will be no sapce.


 also which api should i used to delete containt of the file?

 thank you
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Beginners group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: easy stuff please reply

2009-09-03 Thread kapnkore
i checked this but it takes string as a parameter but write as a charactor
only in the file.so again space is there.

On Thu, Sep 3, 2009 at 7:35 PM, Justin Anderson janderson@gmail.comwrote:

 Why not use one of the methods from OutputStreamWriter that takes a string
 as a parameter?
 http://developer.android.com/reference/java/io/OutputStreamWriter.html

 --
 There are only 10 types of people in the world...
 Those who know binary and those who don't.
 --



 On Thu, Sep 3, 2009 at 6:15 AM, kapil.k kapnk...@gmail.com wrote:


 hello guys i am writing the data in text file with help of

  fos = new FileOutputStream(file);
   out1 =new OutputStreamWriter(fos);
   out=new DataOutputStream(fos);
   String Dpass = new String (1008);

   out.writeChars(Dpass);

 but in file due to char it is leaving space after each charactor.so
 how should i store so the will be no sapce.


 also which api should i used to delete containt of the file?

 thank you



 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Beginners group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: easy stuff please reply

2009-09-03 Thread Jack Ha

Have you tried using PrintWriter?

--
Jack Ha
Open Source Development Center
・T・ ・ ・Mobile・ stick together
The coverage you need at the price you want

The views, opinions and statements in this email are those of
the author solely in their individual capacity, and do not
necessarily represent those of T-Mobile USA, Inc.

On Sep 3, 9:33 pm, kapnk...@gmail.com wrote:
 i checked this but it takes string as a parameter but write as a charactor
 only in the file.so again space is there.

 On Thu, Sep 3, 2009 at 7:35 PM, Justin Anderson 
 janderson@gmail.comwrote:

  Why not use one of the methods from OutputStreamWriter that takes a string
  as a parameter?
 http://developer.android.com/reference/java/io/OutputStreamWriter.html

  --
  There are only 10 types of people in the world...
  Those who know binary and those who don't.
  --

  On Thu, Sep 3, 2009 at 6:15 AM, kapil.k kapnk...@gmail.com wrote:

  hello guys i am writing the data in text file with help of

   fos = new FileOutputStream(file);
                out1 =new OutputStreamWriter(fos);
                out=new DataOutputStream(fos);
                String Dpass = new String (1008);

                out.writeChars(Dpass);

  but in file due to char it is leaving space after each charactor.so
  how should i store so the will be no sapce.

  also which api should i used to delete containt of the file?

  thank you


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Beginners group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---