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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

write byte array to a file

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Hello all, i am having problems. I am trying to simply write the array bytes out to a .dat file,
it is creating the file but it is empty. I'm not to good at Java IO so I need help - what am i doing wrong??
thanks , here is the code:
[ edited to break apart the long code line in order to alleviate the pain of scrolling left-right -ds ]
[ June 18, 2003: Message edited by: Dirk Schreckmann ]
 
Ranch Hand
Posts: 529
C++ Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Try closing the stream. bos.close()
Hope it helps!
Barry
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
I'm moving this to the IO and Streams forum...
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Actually we've got one here already, thanks.
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic