src/java.xml/share/classes/com/sun/xml/internal/stream/writers/XMLStreamWriterImpl.java
equal
deleted
inserted
replaced
40 import java.nio.charset.CharsetEncoder; |
40 import java.nio.charset.CharsetEncoder; |
41 import java.util.AbstractMap; |
41 import java.util.AbstractMap; |
42 import java.util.ArrayList; |
42 import java.util.ArrayList; |
43 import java.util.HashMap; |
43 import java.util.HashMap; |
44 import java.util.Iterator; |
44 import java.util.Iterator; |
|
45 import java.util.List; |
|
46 import java.util.Map; |
45 import java.util.Random; |
47 import java.util.Random; |
46 import java.util.Set; |
48 import java.util.Set; |
47 import java.util.Vector; |
|
48 import javax.xml.XMLConstants; |
49 import javax.xml.XMLConstants; |
49 import javax.xml.namespace.NamespaceContext; |
50 import javax.xml.namespace.NamespaceContext; |
50 import javax.xml.stream.XMLOutputFactory; |
51 import javax.xml.stream.XMLOutputFactory; |
51 import javax.xml.stream.XMLStreamConstants; |
52 import javax.xml.stream.XMLStreamConstants; |
52 import javax.xml.stream.XMLStreamException; |
53 import javax.xml.stream.XMLStreamException; |
109 private OutputStream fOutputStream = null; |
110 private OutputStream fOutputStream = null; |
110 |
111 |
111 /** |
112 /** |
112 * Collects attributes when the writer is in reparing mode. |
113 * Collects attributes when the writer is in reparing mode. |
113 */ |
114 */ |
114 private ArrayList<Attribute> fAttributeCache; |
115 private List<Attribute> fAttributeCache; |
115 |
116 |
116 /** |
117 /** |
117 * Collects namespace declarations when the writer is in reparing mode. |
118 * Collects namespace declarations when the writer is in reparing mode. |
118 */ |
119 */ |
119 private ArrayList<QName> fNamespaceDecls; |
120 private List<QName> fNamespaceDecls; |
120 |
121 |
121 /** |
122 /** |
122 * Namespace context encapsulating user specified context |
123 * Namespace context encapsulating user specified context |
123 * and context built by the writer |
124 * and context built by the writer |
124 */ |
125 */ |
162 /** |
163 /** |
163 * This is used to hold the namespace for attributes which happen to have |
164 * This is used to hold the namespace for attributes which happen to have |
164 * the same uri as the default namespace; It's added to avoid changing the |
165 * the same uri as the default namespace; It's added to avoid changing the |
165 * current impl. which has many redundant code for the repair mode |
166 * current impl. which has many redundant code for the repair mode |
166 */ |
167 */ |
167 HashMap<String, String> fAttrNamespace = null; |
168 Map<String, String> fAttrNamespace = null; |
168 |
169 |
169 /** |
170 /** |
170 * Creates a new instance of XMLStreamWriterImpl. Uses platform's default |
171 * Creates a new instance of XMLStreamWriterImpl. Uses platform's default |
171 * encoding. |
172 * encoding. |
172 * |
173 * |
2144 return null; |
2145 return null; |
2145 } |
2146 } |
2146 |
2147 |
2147 //Cleanup note: leaving these warnings to a xerces.internal.util cleanup |
2148 //Cleanup note: leaving these warnings to a xerces.internal.util cleanup |
2148 public Iterator<String> getPrefixes(String uri) { |
2149 public Iterator<String> getPrefixes(String uri) { |
2149 Vector prefixes = null; |
2150 List<String> prefixes = null; |
2150 Iterator<String> itr = null; |
2151 Iterator<String> itr = null; |
2151 |
2152 |
2152 if (uri != null) { |
2153 if (uri != null) { |
2153 uri = fSymbolTable.addSymbol(uri); |
2154 uri = fSymbolTable.addSymbol(uri); |
2154 } |
2155 } |