Dear Jason,
Thanks for your answer. Although StringBufferInputStream() is just
deprecated, I got error message when I use it in Orion:

Syntax error in source
__jspPage6.java:13: Class BufferedReader not found.
        rstr = new BufferedReader(new InputStreamReader(
                   ^
Note: __jspPage6.java uses or overrides a deprecated API.  Recompile with
"-deprecation" for details.
1 error, 1 warning

BTW, I like your book! I learn much from it!
I am long for the 2nd edition.

Jason Hunter �g�D�G

Yoyo Chen wrote:
>
> Hi, all:
>
> I use String rstr = new BufferedReader(new InputStreamReader(new
> StringBufferInputStream(str), "Big5")).readLine(); to convert query
> string into Chinese(Big5). But StringBufferInputStream was
> deprecated. How can I do this? Can anyone give me a hint?

I don't think you can, because this is a behavior the JDK doesn't
expect -- treating a String like an array of bytes.  If anyone has a
way, speak up.  I'll change p. 393 of my book to match.  :-)

The good news is the method is only deprecated, not removed, so the
code still works and probably will for a long time.  I'll scream loudly
if they ever remove it.

-jh-

--
Jason Hunter
[EMAIL PROTECTED]
Book:    http://www.servlets.com/book
2.0 to 2.1: http://www.javaworld.com/jw-12-1998/jw-12-servletapi.html
2.1 to 2.2: http://www.javaworld.com/jw-10-1999/jw-10-servletapi.html
 
 

--
  Ming-Cheng Chen (������)
  Associate Researcher
  ChungHwa Telecom Co., Telecommunication Lab.
  Electronic Toll Collection for Highway Project
  Tel: 886-3-4245996     Fax: 886-3-4245194
  E-mail: [EMAIL PROTECTED]
  http://www.ham.com.tw/~bm4acd
  =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to