Output in a JAR to an internal file

So, when reading from a file packaged in a JAR, in order to get input to work correctly, the class must use this.getClass().getResourceAsStream("file.txt").What is the equivalent code for output, if one wanted an OutputStream?
[272 byte] By [Childa] at [2007-11-27 3:38:06]
# 1
Classes in java.util.jar
ChuckBinga at 2007-7-12 8:41:25 > top of Java-index,Desktop,Deploying...
# 2
You might not be able to change JARs at runtime because they might be in use due to the JVM using them, so they'll be locked and read-only.
RichFearna at 2007-7-12 8:41:25 > top of Java-index,Desktop,Deploying...