Mercurial > dive4elements > framework
view artifact-database/src/main/java/de/intevation/artifactdatabase/rest/OutRepresentation.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 | 22b03d5c84c5 |
children | c2d53bd30ab8 |
line wrap: on
line source
package de.intevation.artifactdatabase.rest; import org.restlet.representation.OutputRepresentation; import de.intevation.artifacts.Artifact; import org.restlet.data.MediaType; import java.io.OutputStream; import java.io.IOException; import org.w3c.dom.Document; /** * @author Sascha L. Teichmann (sascha.teichmann@intevation) */ public class OutRepresentation extends OutputRepresentation { protected Artifact artifact; protected Document document; protected Object context; public OutRepresentation( MediaType mediaType, Artifact artifact, Document document, Object context ) { super(mediaType); this.artifact = artifact; this.document = document; this.context = context; } public void write(OutputStream outputStream) throws IOException { artifact.out(document, outputStream, context); } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8: