<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<!--NewPage--> | |
<HTML> | |
<HEAD> | |
<!-- Generated by javadoc (build 1.6.0_04) on Thu Mar 19 08:48:28 PDT 2009 --> | |
<META http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<TITLE> | |
UnicodeInputStream (Apache Velocity 1.6.2 API) | |
</TITLE> | |
<META NAME="date" CONTENT="2009-03-19"> | |
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> | |
<SCRIPT type="text/javascript"> | |
function windowTitle() | |
{ | |
if (location.href.indexOf('is-external=true') == -1) { | |
parent.document.title="UnicodeInputStream (Apache Velocity 1.6.2 API)"; | |
} | |
} | |
</SCRIPT> | |
<NOSCRIPT> | |
</NOSCRIPT> | |
</HEAD> | |
<BODY BGCOLOR="white" onload="windowTitle();"> | |
<HR> | |
<!-- ========= START OF TOP NAVBAR ======= --> | |
<A NAME="navbar_top"><!-- --></A> | |
<A HREF="#skip-navbar_top" title="Skip navigation links"></A> | |
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> | |
<TR> | |
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> | |
<A NAME="navbar_top_firstrow"><!-- --></A> | |
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> | |
<TR ALIGN="center" VALIGN="top"> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> | |
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/UnicodeInputStream.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> | |
</TR> | |
</TABLE> | |
</TD> | |
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> | |
</EM> | |
</TD> | |
</TR> | |
<TR> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
PREV CLASS | |
<A HREF="../../../../org/apache/velocity/io/VelocityWriter.html" title="class in org.apache.velocity.io"><B>NEXT CLASS</B></A></FONT></TD> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../index.html?org/apache/velocity/io/UnicodeInputStream.html" target="_top"><B>FRAMES</B></A> | |
<A HREF="UnicodeInputStream.html" target="_top"><B>NO FRAMES</B></A> | |
<SCRIPT type="text/javascript"> | |
<!-- | |
if(window==top) { | |
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); | |
} | |
//--> | |
</SCRIPT> | |
<NOSCRIPT> | |
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> | |
</NOSCRIPT> | |
</FONT></TD> | |
</TR> | |
<TR> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> | |
</TR> | |
</TABLE> | |
<A NAME="skip-navbar_top"></A> | |
<!-- ========= END OF TOP NAVBAR ========= --> | |
<HR> | |
<!-- ======== START OF CLASS DATA ======== --> | |
<H2> | |
<FONT SIZE="-1"> | |
org.apache.velocity.io</FONT> | |
<BR> | |
Class UnicodeInputStream</H2> | |
<PRE> | |
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A> | |
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">java.io.InputStream</A> | |
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.velocity.io.UnicodeInputStream</B> | |
</PRE> | |
<DL> | |
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</A></DD> | |
</DL> | |
<HR> | |
<DL> | |
<DT><PRE>public class <B>UnicodeInputStream</B><DT>extends <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A></DL> | |
</PRE> | |
<P> | |
This is an input stream that is unicode BOM aware. This allows you to e.g. read | |
Windows Notepad Unicode files as Velocity templates. | |
It allows you to check the actual encoding of a file by calling <A HREF="../../../../org/apache/velocity/io/UnicodeInputStream.html#getEncodingFromStream()"><CODE>getEncodingFromStream()</CODE></A> on | |
the input stream reader. | |
This class is not thread safe! When more than one thread wants to use an instance of UnicodeInputStream, | |
the caller must provide synchronization. | |
<P> | |
<P> | |
<DL> | |
<DT><B>Since:</B></DT> | |
<DD>1.5</DD> | |
<DT><B>Version:</B></DT> | |
<DD>$Id: UnicodeInputStream.java 685685 2008-08-13 21:43:27Z nbubna $</DD> | |
<DT><B>Author:</B></DT> | |
<DD><a href="mailto:mailmur@yahoo.com">Aki Nieminen</a>, <a href="mailto:henning@apache.org">Henning P. Schmiedehausen</a></DD> | |
</DL> | |
<HR> | |
<P> | |
<!-- =========== FIELD SUMMARY =========== --> | |
<A NAME="field_summary"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> | |
<B>Field Summary</B></FONT></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static org.apache.velocity.io.UnicodeInputStream.UnicodeBOM</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/velocity/io/UnicodeInputStream.html#UTF16BE_BOM">UTF16BE_BOM</A></B></CODE> | |
<BR> | |
BOM Marker for UTF 16, big endian.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static org.apache.velocity.io.UnicodeInputStream.UnicodeBOM</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/velocity/io/UnicodeInputStream.html#UTF16LE_BOM">UTF16LE_BOM</A></B></CODE> | |
<BR> | |
BOM Marker for UTF 16, little endian.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static org.apache.velocity.io.UnicodeInputStream.UnicodeBOM</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/velocity/io/UnicodeInputStream.html#UTF32BE_BOM">UTF32BE_BOM</A></B></CODE> | |
<BR> | |
BOM Marker for UTF 32, big endian.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static org.apache.velocity.io.UnicodeInputStream.UnicodeBOM</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/velocity/io/UnicodeInputStream.html#UTF32LE_BOM">UTF32LE_BOM</A></B></CODE> | |
<BR> | |
BOM Marker for UTF 32, little endian.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static org.apache.velocity.io.UnicodeInputStream.UnicodeBOM</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/velocity/io/UnicodeInputStream.html#UTF8_BOM">UTF8_BOM</A></B></CODE> | |
<BR> | |
BOM Marker for UTF 8.</TD> | |
</TR> | |
</TABLE> | |
| |
<!-- ======== CONSTRUCTOR SUMMARY ======== --> | |
<A NAME="constructor_summary"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> | |
<B>Constructor Summary</B></FONT></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD><CODE><B><A HREF="../../../../org/apache/velocity/io/UnicodeInputStream.html#UnicodeInputStream(java.io.InputStream)">UnicodeInputStream</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A> inputStream)</CODE> | |
<BR> | |
Creates a new UnicodeInputStream object.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD><CODE><B><A HREF="../../../../org/apache/velocity/io/UnicodeInputStream.html#UnicodeInputStream(java.io.InputStream, boolean)">UnicodeInputStream</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A> inputStream, | |
boolean skipBOM)</CODE> | |
<BR> | |
Creates a new UnicodeInputStream object.</TD> | |
</TR> | |
</TABLE> | |
| |
<!-- ========== METHOD SUMMARY =========== --> | |
<A NAME="method_summary"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> | |
<B>Method Summary</B></FONT></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> int</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/velocity/io/UnicodeInputStream.html#available()">available</A></B>()</CODE> | |
<BR> | |
</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/velocity/io/UnicodeInputStream.html#close()">close</A></B>()</CODE> | |
<BR> | |
</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/velocity/io/UnicodeInputStream.html#getEncodingFromStream()">getEncodingFromStream</A></B>()</CODE> | |
<BR> | |
Read encoding based on BOM.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/velocity/io/UnicodeInputStream.html#isSkipBOM()">isSkipBOM</A></B>()</CODE> | |
<BR> | |
Returns true if the input stream discards the BOM.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/velocity/io/UnicodeInputStream.html#mark(int)">mark</A></B>(int readlimit)</CODE> | |
<BR> | |
</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/velocity/io/UnicodeInputStream.html#markSupported()">markSupported</A></B>()</CODE> | |
<BR> | |
</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> int</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/velocity/io/UnicodeInputStream.html#read()">read</A></B>()</CODE> | |
<BR> | |
</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> int</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/velocity/io/UnicodeInputStream.html#read(byte[])">read</A></B>(byte[] b)</CODE> | |
<BR> | |
</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> int</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/velocity/io/UnicodeInputStream.html#read(byte[], int, int)">read</A></B>(byte[] b, | |
int off, | |
int len)</CODE> | |
<BR> | |
</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/velocity/io/UnicodeInputStream.html#readEncoding()">readEncoding</A></B>()</CODE> | |
<BR> | |
This method gets the encoding from the stream contents if a BOM exists.</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/velocity/io/UnicodeInputStream.html#reset()">reset</A></B>()</CODE> | |
<BR> | |
</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> long</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../org/apache/velocity/io/UnicodeInputStream.html#skip(long)">skip</A></B>(long n)</CODE> | |
<BR> | |
</TD> | |
</TR> | |
</TABLE> | |
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> | |
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD> | |
</TR> | |
</TABLE> | |
| |
<P> | |
<!-- ============ FIELD DETAIL =========== --> | |
<A NAME="field_detail"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> | |
<B>Field Detail</B></FONT></TH> | |
</TR> | |
</TABLE> | |
<A NAME="UTF8_BOM"><!-- --></A><H3> | |
UTF8_BOM</H3> | |
<PRE> | |
public static final org.apache.velocity.io.UnicodeInputStream.UnicodeBOM <B>UTF8_BOM</B></PRE> | |
<DL> | |
<DD>BOM Marker for UTF 8. See http://www.unicode.org/unicode/faq/utf_bom.html | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="UTF16LE_BOM"><!-- --></A><H3> | |
UTF16LE_BOM</H3> | |
<PRE> | |
public static final org.apache.velocity.io.UnicodeInputStream.UnicodeBOM <B>UTF16LE_BOM</B></PRE> | |
<DL> | |
<DD>BOM Marker for UTF 16, little endian. See http://www.unicode.org/unicode/faq/utf_bom.html | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="UTF16BE_BOM"><!-- --></A><H3> | |
UTF16BE_BOM</H3> | |
<PRE> | |
public static final org.apache.velocity.io.UnicodeInputStream.UnicodeBOM <B>UTF16BE_BOM</B></PRE> | |
<DL> | |
<DD>BOM Marker for UTF 16, big endian. See http://www.unicode.org/unicode/faq/utf_bom.html | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="UTF32LE_BOM"><!-- --></A><H3> | |
UTF32LE_BOM</H3> | |
<PRE> | |
public static final org.apache.velocity.io.UnicodeInputStream.UnicodeBOM <B>UTF32LE_BOM</B></PRE> | |
<DL> | |
<DD>BOM Marker for UTF 32, little endian. See http://www.unicode.org/unicode/faq/utf_bom.html | |
TODO: Does Java actually support this? | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<HR> | |
<A NAME="UTF32BE_BOM"><!-- --></A><H3> | |
UTF32BE_BOM</H3> | |
<PRE> | |
public static final org.apache.velocity.io.UnicodeInputStream.UnicodeBOM <B>UTF32BE_BOM</B></PRE> | |
<DL> | |
<DD>BOM Marker for UTF 32, big endian. See http://www.unicode.org/unicode/faq/utf_bom.html | |
TODO: Does Java actually support this? | |
<P> | |
<DL> | |
</DL> | |
</DL> | |
<!-- ========= CONSTRUCTOR DETAIL ======== --> | |
<A NAME="constructor_detail"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> | |
<B>Constructor Detail</B></FONT></TH> | |
</TR> | |
</TABLE> | |
<A NAME="UnicodeInputStream(java.io.InputStream)"><!-- --></A><H3> | |
UnicodeInputStream</H3> | |
<PRE> | |
public <B>UnicodeInputStream</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A> inputStream) | |
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A>, | |
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE> | |
<DL> | |
<DD>Creates a new UnicodeInputStream object. Skips a BOM which defines the file encoding. | |
<P> | |
<DL> | |
<DT><B>Parameters:</B><DD><CODE>inputStream</CODE> - The input stream to use for reading. | |
<DT><B>Throws:</B> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL> | |
</DL> | |
<HR> | |
<A NAME="UnicodeInputStream(java.io.InputStream, boolean)"><!-- --></A><H3> | |
UnicodeInputStream</H3> | |
<PRE> | |
public <B>UnicodeInputStream</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A> inputStream, | |
boolean skipBOM) | |
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A>, | |
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE> | |
<DL> | |
<DD>Creates a new UnicodeInputStream object. | |
<P> | |
<DL> | |
<DT><B>Parameters:</B><DD><CODE>inputStream</CODE> - The input stream to use for reading.<DD><CODE>skipBOM</CODE> - If this is set to true, a BOM read from the stream is discarded. This parameter should normally be true. | |
<DT><B>Throws:</B> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL> | |
</DL> | |
<!-- ============ METHOD DETAIL ========== --> | |
<A NAME="method_detail"><!-- --></A> | |
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> | |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> | |
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> | |
<B>Method Detail</B></FONT></TH> | |
</TR> | |
</TABLE> | |
<A NAME="isSkipBOM()"><!-- --></A><H3> | |
isSkipBOM</H3> | |
<PRE> | |
public boolean <B>isSkipBOM</B>()</PRE> | |
<DL> | |
<DD>Returns true if the input stream discards the BOM. | |
<P> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>True if the input stream discards the BOM.</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="getEncodingFromStream()"><!-- --></A><H3> | |
getEncodingFromStream</H3> | |
<PRE> | |
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getEncodingFromStream</B>()</PRE> | |
<DL> | |
<DD>Read encoding based on BOM. | |
<P> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>The encoding based on the BOM. | |
<DT><B>Throws:</B> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - When a problem reading the BOM occured.</DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="readEncoding()"><!-- --></A><H3> | |
readEncoding</H3> | |
<PRE> | |
protected <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>readEncoding</B>() | |
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE> | |
<DL> | |
<DD>This method gets the encoding from the stream contents if a BOM exists. If no BOM exists, the encoding | |
is undefined. | |
<P> | |
<DD><DL> | |
<DT><B>Returns:</B><DD>The encoding of this streams contents as decided by the BOM or null if no BOM was found. | |
<DT><B>Throws:</B> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="close()"><!-- --></A><H3> | |
close</H3> | |
<PRE> | |
public void <B>close</B>() | |
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE> | |
<DL> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Closeable.html?is-external=true#close()" title="class or interface in java.io">close</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true#close()" title="class or interface in java.io">close</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Throws:</B> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE><DT><B>See Also:</B><DD><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true#close()" title="class or interface in java.io"><CODE>InputStream.close()</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="available()"><!-- --></A><H3> | |
available</H3> | |
<PRE> | |
public int <B>available</B>() | |
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE> | |
<DL> | |
<DD><DL> | |
<DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true#available()" title="class or interface in java.io">available</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Throws:</B> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE><DT><B>See Also:</B><DD><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true#available()" title="class or interface in java.io"><CODE>InputStream.available()</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="mark(int)"><!-- --></A><H3> | |
mark</H3> | |
<PRE> | |
public void <B>mark</B>(int readlimit)</PRE> | |
<DL> | |
<DD><DL> | |
<DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true#mark(int)" title="class or interface in java.io">mark</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>See Also:</B><DD><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true#mark(int)" title="class or interface in java.io"><CODE>InputStream.mark(int)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="markSupported()"><!-- --></A><H3> | |
markSupported</H3> | |
<PRE> | |
public boolean <B>markSupported</B>()</PRE> | |
<DL> | |
<DD><DL> | |
<DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true#markSupported()" title="class or interface in java.io">markSupported</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>See Also:</B><DD><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true#markSupported()" title="class or interface in java.io"><CODE>InputStream.markSupported()</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="read()"><!-- --></A><H3> | |
read</H3> | |
<PRE> | |
public int <B>read</B>() | |
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE> | |
<DL> | |
<DD><DL> | |
<DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true#read()" title="class or interface in java.io">read</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Throws:</B> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE><DT><B>See Also:</B><DD><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true#read()" title="class or interface in java.io"><CODE>InputStream.read()</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="read(byte[])"><!-- --></A><H3> | |
read</H3> | |
<PRE> | |
public int <B>read</B>(byte[] b) | |
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE> | |
<DL> | |
<DD><DL> | |
<DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true#read(byte[])" title="class or interface in java.io">read</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Throws:</B> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE><DT><B>See Also:</B><DD><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true#read(byte[])" title="class or interface in java.io"><CODE>InputStream.read(byte[])</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="read(byte[], int, int)"><!-- --></A><H3> | |
read</H3> | |
<PRE> | |
public int <B>read</B>(byte[] b, | |
int off, | |
int len) | |
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE> | |
<DL> | |
<DD><DL> | |
<DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true#read(byte[], int, int)" title="class or interface in java.io">read</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Throws:</B> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE><DT><B>See Also:</B><DD><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true#read(byte[], int, int)" title="class or interface in java.io"><CODE>InputStream.read(byte[], int, int)</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="reset()"><!-- --></A><H3> | |
reset</H3> | |
<PRE> | |
public void <B>reset</B>() | |
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE> | |
<DL> | |
<DD><DL> | |
<DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true#reset()" title="class or interface in java.io">reset</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Throws:</B> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE><DT><B>See Also:</B><DD><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true#reset()" title="class or interface in java.io"><CODE>InputStream.reset()</CODE></A></DL> | |
</DD> | |
</DL> | |
<HR> | |
<A NAME="skip(long)"><!-- --></A><H3> | |
skip</H3> | |
<PRE> | |
public long <B>skip</B>(long n) | |
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE> | |
<DL> | |
<DD><DL> | |
<DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true#skip(long)" title="class or interface in java.io">skip</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A></CODE></DL> | |
</DD> | |
<DD><DL> | |
<DT><B>Throws:</B> | |
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE><DT><B>See Also:</B><DD><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html?is-external=true#skip(long)" title="class or interface in java.io"><CODE>InputStream.skip(long)</CODE></A></DL> | |
</DD> | |
</DL> | |
<!-- ========= END OF CLASS DATA ========= --> | |
<HR> | |
<!-- ======= START OF BOTTOM NAVBAR ====== --> | |
<A NAME="navbar_bottom"><!-- --></A> | |
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> | |
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> | |
<TR> | |
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> | |
<A NAME="navbar_bottom_firstrow"><!-- --></A> | |
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> | |
<TR ALIGN="center" VALIGN="top"> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> | |
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/UnicodeInputStream.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> | |
</TR> | |
</TABLE> | |
</TD> | |
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> | |
</EM> | |
</TD> | |
</TR> | |
<TR> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
PREV CLASS | |
<A HREF="../../../../org/apache/velocity/io/VelocityWriter.html" title="class in org.apache.velocity.io"><B>NEXT CLASS</B></A></FONT></TD> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../index.html?org/apache/velocity/io/UnicodeInputStream.html" target="_top"><B>FRAMES</B></A> | |
<A HREF="UnicodeInputStream.html" target="_top"><B>NO FRAMES</B></A> | |
<SCRIPT type="text/javascript"> | |
<!-- | |
if(window==top) { | |
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); | |
} | |
//--> | |
</SCRIPT> | |
<NOSCRIPT> | |
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> | |
</NOSCRIPT> | |
</FONT></TD> | |
</TR> | |
<TR> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> | |
</TR> | |
</TABLE> | |
<A NAME="skip-navbar_bottom"></A> | |
<!-- ======== END OF BOTTOM NAVBAR ======= --> | |
<HR> | |
Copyright © 2000-2009 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved. | |
</BODY> | |
</HTML> |