Bookmark Topic Watch Topic
  • New Topic

write byte array to a file

 
roy williams
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • 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 ]
 
Barry Andrews
Ranch Hand
Posts: 529
C++ Java Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator
Try closing the stream. bos.close()
Hope it helps!
Barry
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Report post to moderator
I'm moving this to the IO and Streams forum...
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Report post to moderator
Actually we've got one here already, thanks.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!