1
2
3
4
5
6
7
8 package it.imolinfo.jbi4corba.jbi.cxf;
9
10 import java.io.IOException;
11 import java.io.InputStreamReader;
12 import java.io.LineNumberReader;
13 import java.net.URL;
14
15
16
17
18 public class Jbi4CorbaIncludeStackEntry {
19 private final URL url;
20
21 private LineNumberReader reader;
22
23 private final String location;
24
25 Jbi4CorbaIncludeStackEntry(URL link, String loc) throws IOException {
26 this.url = link;
27 this.location = loc;
28 this.reader = new LineNumberReader(new InputStreamReader(url.openStream(), "ISO-8859-1"));
29 this.reader.setLineNumber(1);
30 }
31
32 public String getLocation() {
33 return location;
34 }
35
36 public URL getURL() {
37 return url;
38 }
39
40 public LineNumberReader getReader() {
41 return reader;
42 }
43
44 public String toString() {
45 return "IncludeStackEntry[url=" + url + ", location=" + location
46 + ", line=" + reader.getLineNumber() + "]";
47 }
48 }
49
50