• Post Reply Bookmark Topic Watch Topic
  • New Topic

OutputStream

 
feda alshahwan
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would like to open outputStream to a resource file and write to it ? How this can be done ?Thanks
 
Rob Spoor
Sheriff
Posts: 20820
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since a resource can be located inside a JAR file, I don't think it's possible at all.
 
feda alshahwan
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried reading from it but the writting I couldnot manage to do it . Why it is not possible?
 
Rob Spoor
Sheriff
Posts: 20820
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because for JAR files that would require modifying the JAR file while it is still in use by the JVM. The operating system probably won't allow that; Windows most certainly won't.
 
feda alshahwan
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But How did I manage reading a file?
 
Rob Spoor
Sheriff
Posts: 20820
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because reading from the JAR file when it is in use is not always a problem. With JAR files, I haven't found a problem at all so far.
 
feda alshahwan
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no other way to accomplish writting to resources through outputstream??
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!