diff options
author | Reinier Zwitserloot <reinier@tipit.to> | 2009-07-18 00:25:09 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@tipit.to> | 2009-07-18 00:25:09 +0200 |
commit | efe46f68a9d0363fd58222048ddfa9efaf1bc9cd (patch) | |
tree | 10eaca8f6ea888d0e076cd356126f61d3cce2f54 /usage_examples/CleanupExample_post.jpage | |
parent | 97974b9104430d4c31ef003da3643a7905af46c6 (diff) | |
download | lombok-efe46f68a9d0363fd58222048ddfa9efaf1bc9cd.tar.gz lombok-efe46f68a9d0363fd58222048ddfa9efaf1bc9cd.tar.bz2 lombok-efe46f68a9d0363fd58222048ddfa9efaf1bc9cd.zip |
Added Cleanup features text.
Diffstat (limited to 'usage_examples/CleanupExample_post.jpage')
-rw-r--r-- | usage_examples/CleanupExample_post.jpage | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/usage_examples/CleanupExample_post.jpage b/usage_examples/CleanupExample_post.jpage new file mode 100644 index 00000000..91458459 --- /dev/null +++ b/usage_examples/CleanupExample_post.jpage @@ -0,0 +1,22 @@ +import java.io.*; + +public class CleanupExample { + public static void main(String[] args) throws IOException { + InputStream in = new FileInputStream(args[0]); + try { + OutputStream out = new FileOutputStream(args[1]); + try { + byte[] b = new byte[10000]; + while (true) { + int r = in.read(b); + if (r == -1) break; + out.write(b, 0, r); + } + } finally { + out.close(); + } + } finally { + in.close(); + } + } +} |