src/share/classes/com/sun/tools/doclets/internal/toolkit/util/SourceToHTMLConverter.java

changeset 191
d79ad96ce47c
parent 117
24a47c3062fe
child 197
1bf037016426
equal deleted inserted replaced
187:e157bd68dfc5 191:d79ad96ce47c
140 } 140 }
141 } finally { 141 } finally {
142 reader.close(); 142 reader.close();
143 } 143 }
144 output = addLineNumbers(output.toString()); 144 output = addLineNumbers(output.toString());
145 output.insert(0, getHeader()); 145 output.insert(0, getHeader(configuration));
146 output.append(getFooter()); 146 output.append(getFooter());
147 writeToFile(output.toString(), outputdir, cd.name(), configuration); 147 writeToFile(output.toString(), outputdir, cd.name(), configuration);
148 } catch (Exception e){ 148 } catch (Exception e){
149 e.printStackTrace(); 149 e.printStackTrace();
150 } 150 }
190 return sb; 190 return sb;
191 } 191 }
192 192
193 /** 193 /**
194 * Get the header. 194 * Get the header.
195 * @param configuration the Doclet configuration
195 * @return the header to the output file 196 * @return the header to the output file
196 */ 197 */
197 protected static String getHeader() { 198 protected static String getHeader(Configuration configuration) {
198 StringBuffer result = new StringBuffer("<HTML>" + DocletConstants.NL); 199 StringBuffer result = new StringBuffer("<HTML lang=\"" + configuration.getLocale().getLanguage() + "\">" + DocletConstants.NL);
199 result.append("<BODY BGCOLOR=\""+ BGCOLOR + "\">" + DocletConstants.NL); 200 result.append("<BODY BGCOLOR=\""+ BGCOLOR + "\">" + DocletConstants.NL);
200 result.append("<PRE>" + DocletConstants.NL); 201 result.append("<PRE>" + DocletConstants.NL);
201 return result.toString(); 202 return result.toString();
202 } 203 }
203 204

mercurial