blob: cdeb93c972945e652be18f6e8a8aeca04669cca6 [file] [log] [blame]
Stuart McCullochb32291a2012-07-16 14:10:57 +00001package aQute.bnd.component;
2
3import java.io.*;
4
5import aQute.bnd.osgi.*;
6import aQute.lib.tag.*;
7
8class TagResource extends WriteResource {
9 final Tag tag;
10
11 public TagResource(Tag tag) {
12 this.tag = tag;
13 }
14
15 public void write(OutputStream out) throws UnsupportedEncodingException {
16 OutputStreamWriter ow = new OutputStreamWriter(out, "UTF-8");
17 PrintWriter pw = new PrintWriter(ow);
18 pw.println("<?xml version='1.1'?>");
19 try {
20 tag.print(0, pw);
21 }
22 finally {
23 pw.flush();
24 }
25 }
26
27 public long lastModified() {
28 return 0;
29 }
30
31}