• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

comment problem

 
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
well in my java program is reading the contents of a file (say for ex: service.txt),
the contents of the txt file is like this
[Gvalue]
file=copy.xml
my program reads this and works well but what happens now is that when i comment out something in my txt file say like this
//[gvalue]
file =do.xml
[Gvalue]
file=copy.xml
then im getting a exception (java.lang.null) , i dont want my method to read the commented stuff it has to just skip it off
so kindly help me , my method is like this

[ July 10, 2002: Message edited by: vivek sivakumar ]
 
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Vivek-
Check out the UBB [CODE] tags -- they help to preserve whitespace in your code and make it easier to read.
Question -- why are you using the StringBufferInputStream? -- it was deprecated as of JDK 1.1.
And why did you chose the DataInputStream? If you're just reading text -- wouldn't it be better to just use the BufferedInputStream?
[ July 10, 2002: Message edited by: Jessica Sant ]
 
Ranch Hand
Posts: 1865
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try this.
 
vivek sivakumar
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for ur suggestion dan it works ...
 
These are the worst of times and these are the best of times. And this is the best tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic