📄 servletoutputstream.java
字号:
// IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT
//
// This class must only be used for TINI until all of the stuff
// required by javax.servlet.ServletOutputStream is supported by TINI.
//
// The missing elements are:
//
// java.text.MessageFormat
//
// ServletOutputStream.java - TINI version of javax.servlet.ServletOutputStream.
//
// Copyright (C) 1999-2002 Smart Software Consulting
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// Smart Software Consulting
// 1688 Silverwood Court
// Danville, CA 94526-3079
// USA
//
// http://www.smartsc.com
//
package javax.servlet;
import java.io.*;
public abstract class ServletOutputStream extends OutputStream
{
protected ServletOutputStream()
{
}
public void print( char c)
throws IOException
{
print( String.valueOf( c));
}
public void print( double d)
throws IOException
{
print(String.valueOf(d));
}
public void print( float f)
throws IOException
{
print( String.valueOf( f));
}
public void print( int i)
throws IOException
{
print( String.valueOf( i));
}
public void print( long l)
throws IOException
{
print( String.valueOf( l));
}
public void print( String s)
throws IOException
{
if( s == null)
s = "null";
int i = s.length();
for( int j = 0; j < i; j++)
{
char c = s.charAt( j);
if( (c & 0xff00) != 0)
{
throw new CharConversionException(
"Not an ISO 8859-1 character: " + c);
}
write( c);
}
}
public void print( boolean flag)
throws IOException
{
String s;
if( flag)
s = "true";
else
s = "false";
print( s);
}
public void println()
throws IOException
{
print("\r\n");
}
public void println( char c)
throws IOException
{
print( c);
println();
}
public void println( double d)
throws IOException
{
print( d);
println();
}
public void println( float f)
throws IOException
{
print( f);
println();
}
public void println( int i)
throws IOException
{
print( i);
println();
}
public void println( long l)
throws IOException
{
print( l);
println();
}
public void println( String s)
throws IOException
{
print( s);
println();
}
public void println( boolean flag)
throws IOException
{
print( flag);
println();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -