Mercurial > dive4elements > framework
comparison artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.java @ 31:c4d85a8532d1
Artifact.out() is now called with an java.io.Outpustream
instead of producing bytes.
artifacts/trunk@77 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Sat, 12 Sep 2009 10:45:28 +0000 |
parents | 88972c6daa4f |
children | c2d53bd30ab8 |
comparison
equal
deleted
inserted
replaced
30:88972c6daa4f | 31:c4d85a8532d1 |
---|---|
15 import java.io.IOException; | 15 import java.io.IOException; |
16 import java.io.ByteArrayInputStream; | 16 import java.io.ByteArrayInputStream; |
17 import java.io.ByteArrayOutputStream; | 17 import java.io.ByteArrayOutputStream; |
18 import java.io.ObjectOutputStream; | 18 import java.io.ObjectOutputStream; |
19 import java.io.ObjectInputStream; | 19 import java.io.ObjectInputStream; |
20 import java.io.OutputStream; | |
20 | 21 |
21 import java.util.zip.GZIPOutputStream; | 22 import java.util.zip.GZIPOutputStream; |
22 import java.util.zip.GZIPInputStream; | 23 import java.util.zip.GZIPInputStream; |
23 | 24 |
24 import de.intevation.artifacts.ArtifactFactory; | 25 import de.intevation.artifacts.ArtifactFactory; |
114 finally { | 115 finally { |
115 store(this); | 116 store(this); |
116 } | 117 } |
117 } | 118 } |
118 | 119 |
119 public byte [] out(Document format, Object context) { | 120 public void out( |
120 try { | 121 Document format, |
121 return original.out(format, context); | 122 OutputStream output, |
123 Object context | |
124 ) | |
125 throws IOException | |
126 { | |
127 try { | |
128 original.out(format, output, context); | |
122 } | 129 } |
123 finally { | 130 finally { |
124 touch(this); | 131 touch(this); |
125 } | 132 } |
126 } | 133 } |