PageRenderTime 52ms CodeModel.GetById 20ms app.highlight 25ms RepoModel.GetById 1ms app.codeStats 0ms

/www/tags/NOV_07_2009/htdocs/api/org/gjt/sp/jedit/io/BufferLocalEncodingDetector.html

#
HTML | 258 lines | 211 code | 35 blank | 12 comment | 0 complexity | 7acf7dab1fde029ba0c665328f9a47e7 MD5 | raw file
  1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2<!--NewPage-->
  3<HTML>
  4<HEAD>
  5<!-- Generated by javadoc (build 1.5.0_14) on Tue Jul 22 07:14:02 GMT-08:00 2008 -->
  6<TITLE>
  7BufferLocalEncodingDetector (jEdit API)
  8</TITLE>
  9
 10<META NAME="keywords" CONTENT="org.gjt.sp.jedit.io.BufferLocalEncodingDetector class">
 11
 12<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
 13
 14
 15<NOSCRIPT>
 16</NOSCRIPT>
 17
 18</HEAD>
 19
 20<BODY BGCOLOR="white" >
 21
 22
 23<!-- ========= START OF TOP NAVBAR ======= -->
 24<A NAME="navbar_top"><!-- --></A>
 25<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
 26<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
 27<TR>
 28<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
 29<A NAME="navbar_top_firstrow"><!-- --></A>
 30<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
 31  <TR ALIGN="center" VALIGN="top">
 32  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
 33  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
 34  <TD BGCOLOR="#00008B" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
 35  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/BufferLocalEncodingDetector.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
 36  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
 37  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
 38  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
 39  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
 40  </TR>
 41</TABLE>
 42</TD>
 43<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
 44</EM>
 45</TD>
 46</TR>
 47
 48<TR>
 49<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 50&nbsp;<A HREF="../../../../../org/gjt/sp/jedit/io/AutoDetection.Result.html" title="class in org.gjt.sp.jedit.io"><B>PREV CLASS</B></A>&nbsp;
 51&nbsp;<A HREF="../../../../../org/gjt/sp/jedit/io/CharsetEncoding.html" title="class in org.gjt.sp.jedit.io"><B>NEXT CLASS</B></A></FONT></TD>
 52<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 53  <A HREF="../../../../../index.html?org/gjt/sp/jedit/io/BufferLocalEncodingDetector.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 54&nbsp;<A HREF="BufferLocalEncodingDetector.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
 55&nbsp;
 56<NOSCRIPT>
 57  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
 58</NOSCRIPT>
 59
 60
 61</FONT></TD>
 62</TR>
 63<TR>
 64<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
 65  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
 66<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
 67DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
 68</TR>
 69</TABLE>
 70<A NAME="skip-navbar_top"></A>
 71<!-- ========= END OF TOP NAVBAR ========= -->
 72
 73<HR>
 74<!-- ======== START OF CLASS DATA ======== -->
 75<H2>
 76<FONT SIZE="-1">
 77org.gjt.sp.jedit.io</FONT>
 78<BR>
 79Class BufferLocalEncodingDetector</H2>
 80<PRE>
 81java.lang.Object
 82  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.gjt.sp.jedit.io.BufferLocalEncodingDetector</B>
 83</PRE>
 84<DL>
 85<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../../org/gjt/sp/jedit/io/EncodingDetector.html" title="interface in org.gjt.sp.jedit.io">EncodingDetector</A></DD>
 86</DL>
 87<HR>
 88<DL>
 89<DT><PRE>public class <B>BufferLocalEncodingDetector</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../../../org/gjt/sp/jedit/io/EncodingDetector.html" title="interface in org.gjt.sp.jedit.io">EncodingDetector</A></DL>
 90</PRE>
 91
 92<P>
 93An encoding detector which finds buffer-local-property syntax.
 94
 95 This reads the sample in the system default encoding for first 10
 96 lines and look for ":encoding=..." syntax. This can fail if the
 97 stream cannot be read in the system default encoding or
 98 ":encoding=..." is not placed at near the top of the stream.
 99<P>
100
101<P>
102<DL>
103<DT><B>Since:</B></DT>
104  <DD>4.3pre10</DD>
105</DL>
106<HR>
107
108<P>
109
110<!-- ======== CONSTRUCTOR SUMMARY ======== -->
111
112<A NAME="constructor_summary"><!-- --></A>
113<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
114<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
115<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
116<B>Constructor Summary</B></FONT></TH>
117</TR>
118<TR BGCOLOR="white" CLASS="TableRowColor">
119<TD><CODE><B><A HREF="../../../../../org/gjt/sp/jedit/io/BufferLocalEncodingDetector.html#BufferLocalEncodingDetector()">BufferLocalEncodingDetector</A></B>()</CODE>
120
121<BR>
122&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
123</TR>
124</TABLE>
125&nbsp;
126<!-- ========== METHOD SUMMARY =========== -->
127
128<A NAME="method_summary"><!-- --></A>
129<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
130<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
131<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
132<B>Method Summary</B></FONT></TH>
133</TR>
134<TR BGCOLOR="white" CLASS="TableRowColor">
135<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
136<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
137<TD><CODE><B><A HREF="../../../../../org/gjt/sp/jedit/io/BufferLocalEncodingDetector.html#detectEncoding(java.io.InputStream)">detectEncoding</A></B>(java.io.InputStream&nbsp;sample)</CODE>
138
139<BR>
140&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the name of a detected encoding for the bytes in sample.</TD>
141</TR>
142</TABLE>
143&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
144<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
145<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
146<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
147</TR>
148<TR BGCOLOR="white" CLASS="TableRowColor">
149<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
150</TR>
151</TABLE>
152&nbsp;
153<P>
154
155<!-- ========= CONSTRUCTOR DETAIL ======== -->
156
157<A NAME="constructor_detail"><!-- --></A>
158<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
159<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
160<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
161<B>Constructor Detail</B></FONT></TH>
162</TR>
163</TABLE>
164
165<A NAME="BufferLocalEncodingDetector()"><!-- --></A><H3>
166BufferLocalEncodingDetector</H3>
167<PRE>
168public <B>BufferLocalEncodingDetector</B>()</PRE>
169<DL>
170</DL>
171
172<!-- ============ METHOD DETAIL ========== -->
173
174<A NAME="method_detail"><!-- --></A>
175<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
176<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
177<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
178<B>Method Detail</B></FONT></TH>
179</TR>
180</TABLE>
181
182<A NAME="detectEncoding(java.io.InputStream)"><!-- --></A><H3>
183detectEncoding</H3>
184<PRE>
185public java.lang.String <B>detectEncoding</B>(java.io.InputStream&nbsp;sample)
186                                throws java.io.IOException</PRE>
187<DL>
188<DD><B>Description copied from interface: <CODE><A HREF="../../../../../org/gjt/sp/jedit/io/EncodingDetector.html#detectEncoding(java.io.InputStream)">EncodingDetector</A></CODE></B></DD>
189<DD>Returns the name of a detected encoding for the bytes in sample.
190 Returns null if this instance could not detect reasonable one.
191<P>
192<DD><DL>
193<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/gjt/sp/jedit/io/EncodingDetector.html#detectEncoding(java.io.InputStream)">detectEncoding</A></CODE> in interface <CODE><A HREF="../../../../../org/gjt/sp/jedit/io/EncodingDetector.html" title="interface in org.gjt.sp.jedit.io">EncodingDetector</A></CODE></DL>
194</DD>
195<DD><DL>
196
197<DT><B>Throws:</B>
198<DD><CODE>java.io.IOException</CODE></DL>
199</DD>
200</DL>
201<!-- ========= END OF CLASS DATA ========= -->
202<HR>
203
204
205<!-- ======= START OF BOTTOM NAVBAR ====== -->
206<A NAME="navbar_bottom"><!-- --></A>
207<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
208<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
209<TR>
210<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
211<A NAME="navbar_bottom_firstrow"><!-- --></A>
212<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
213  <TR ALIGN="center" VALIGN="top">
214  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
215  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
216  <TD BGCOLOR="#00008B" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
217  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/BufferLocalEncodingDetector.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
218  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
219  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
220  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
221  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
222  </TR>
223</TABLE>
224</TD>
225<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
226</EM>
227</TD>
228</TR>
229
230<TR>
231<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
232&nbsp;<A HREF="../../../../../org/gjt/sp/jedit/io/AutoDetection.Result.html" title="class in org.gjt.sp.jedit.io"><B>PREV CLASS</B></A>&nbsp;
233&nbsp;<A HREF="../../../../../org/gjt/sp/jedit/io/CharsetEncoding.html" title="class in org.gjt.sp.jedit.io"><B>NEXT CLASS</B></A></FONT></TD>
234<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
235  <A HREF="../../../../../index.html?org/gjt/sp/jedit/io/BufferLocalEncodingDetector.html" target="_top"><B>FRAMES</B></A>  &nbsp;
236&nbsp;<A HREF="BufferLocalEncodingDetector.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
237&nbsp;
238<NOSCRIPT>
239  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
240</NOSCRIPT>
241
242
243</FONT></TD>
244</TR>
245<TR>
246<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
247  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
248<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
249DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
250</TR>
251</TABLE>
252<A NAME="skip-navbar_bottom"></A>
253<!-- ======== END OF BOTTOM NAVBAR ======= -->
254
255<HR>
256
257</BODY>
258</HTML>