ServletOutputStream源码
来源:互联网 发布:软件编程开发 编辑:程序博客网 时间:2024/04/28 02:29
ServletOutputStream源码
public abstract class ServletOutputStream extends OutputStream { private static final String LSTRING_FILE = "javax.servlet.LocalStrings"; private static ResourceBundle lStrings = ResourceBundle.getBundle("javax.servlet.LocalStrings"); protected ServletOutputStream() { } public void print(String s) throws IOException { if(s == null) { s = "null"; } int len = s.length(); for(int i = 0; i < len; ++i) { char c = s.charAt(i); if((c & '\uff00') != 0) { String errMsg = lStrings.getString("err.not_iso8859_1"); Object[] errArgs = new Object[]{new Character(c)}; errMsg = MessageFormat.format(errMsg, errArgs); throw new CharConversionException(errMsg); } this.write(c); } } public void print(boolean b) throws IOException { String msg; if(b) { msg = lStrings.getString("value.true"); } else { msg = lStrings.getString("value.false"); } this.print(msg); } public void print(char c) throws IOException { this.print(String.valueOf(c)); } public void print(int i) throws IOException { this.print(String.valueOf(i)); } public void print(long l) throws IOException { this.print(String.valueOf(l)); } public void print(float f) throws IOException { this.print(String.valueOf(f)); } public void print(double d) throws IOException { this.print(String.valueOf(d)); } public void println() throws IOException { this.print("\r\n"); } public void println(String s) throws IOException { this.print(s); this.println(); } public void println(boolean b) throws IOException { this.print(b); this.println(); } public void println(char c) throws IOException { this.print(c); this.println(); } public void println(int i) throws IOException { this.print(i); this.println(); } public void println(long l) throws IOException { this.print(l); this.println(); } public void println(float f) throws IOException { this.print(f); this.println(); } public void println(double d) throws IOException { this.print(d); this.println(); }}
0 0
- ServletOutputStream源码
- Tomcat源码分析之:ServletOutputStream的实现
- Java-ServletOutputStream
- javax.servlet.ServletOutputStream翻译
- servletinputstream 和 servletoutputstream
- PrintWriter 与 ServletOutputStream的区别
- PrintWriter与ServletOutputStream的区别
- PrintWriter与ServletOutputStream的区别
- PrintWriter和ServletOutputStream的区别
- ServletOutputStream回写页面乱码
- PrintWriter和ServletOutputStream的区别
- ServletOutputStream回写页面乱码
- Servlet--ServletInputStream类,ServletOutputStream类
- PrintWriter与ServletOutputStream的区别
- PrintWriter与ServletOutputStream的区别
- [FW:] Writing big files to ServletOutputStream
- PrintWriter,DataOutputStream和ServletOutputStream的使用
- 关于ServletOutputStream源代码引发的探究
- maya modules
- 设计模式之模板方法模式
- Bugly热更新SDK你需要知道的一些事
- Getting net::ERR_UNKNOWN_URL_SCHEME while calling telephone number from HTML page in Android
- 可变参数宏
- ServletOutputStream源码
- java成神之路
- super用法
- 抽象和封装的知识点
- FWaaS 实践: 允许 ssh - 每天5分钟玩转 OpenStack(119)
- 安卓入门纪录之-jni使用配置方法
- iOS可能用到的开源库和第三方组件
- 关于构造函数
- abstract的一些用法