• Post Reply Bookmark Topic Watch Topic
  • New Topic

Truncating the Zeros when Displaying  RSS feed

 
Ram Adsumalli
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am reading the file as a input stream. And i am adding some data to that file stream and then converting that into StringBuffer to place that into the outputstream to open a file in the browser . The problem is if i add the data as "12340000" to the StringBuffer. it is truncating the zeros and displaying as 1234. how can i display the whole string with truncating the zeros

Any help is really appreciated

 
Joe Ess
Bartender
Posts: 9406
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you show us some code that we can compile and run and displays this behavior? It appears to work correctly for me:


 
Ram Adsumalli
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Joe,

The problem is when i have a zeros at the beginning of the number some thing like 0001234 Its showing me as 1234, happening only when i try to flush to browser. If i try to print on my server console with system.out.println its displaying fine as 0001234. Only problem when i flush it to the Browser

Thanks for you help
 
Joe Ess
Bartender
Posts: 9406
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know what the problem could be. Isolate the Problem and Post Real Code
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!