81,090
社区成员
发帖
与我相关
我的任务
分享
public class MyJspWriter extends JspWriter {
private PrintWriter pw;
protected MyJspWriter(String fileName) {
super(JspWriter.DEFAULT_BUFFER, false);
// TODO Auto-generated constructor stub
try{
File file = new File(fileName);
if(!file.exists())file.createNewFile();
pw = new PrintWriter(fileName,"UTF-8");
}catch(Exception e){
System.out.println("出现异常");
e.printStackTrace();
}
}
@Override
public void clear() throws IOException {
// TODO Auto-generated method stub
}
@Override
public void clearBuffer() throws IOException {
// TODO Auto-generated method stub
}
@Override
public int getRemaining() {
// TODO Auto-generated method stub
return 0;
}
@Override
public void close() throws IOException {
// TODO Auto-generated method stub
pw.close();
}
@Override
public void flush() throws IOException {
// TODO Auto-generated method stub
pw.flush();
}
@Override
public void newLine() throws IOException {
// TODO Auto-generated method stub
pw.println();
}
@Override
public void print(boolean arg0) throws IOException {
// TODO Auto-generated method stub
pw.print(arg0);
}
@Override
public void print(char arg0) throws IOException {
// TODO Auto-generated method stub
pw.print(arg0);
}
@Override
public void print(int arg0) throws IOException {
// TODO Auto-generated method stub
pw.print(arg0);
}
@Override
public void print(long arg0) throws IOException {
// TODO Auto-generated method stub
pw.print(arg0);
}
@Override
public void print(float arg0) throws IOException {
// TODO Auto-generated method stub
pw.print(arg0);
}
@Override
public void print(double arg0) throws IOException {
// TODO Auto-generated method stub
pw.print(arg0);
}
@Override
public void print(char[] arg0) throws IOException {
// TODO Auto-generated method stub
pw.print(arg0);
}
@Override
public void print(String arg0) throws IOException {
// TODO Auto-generated method stub
pw.print(arg0);
}
@Override
public void print(Object arg0) throws IOException {
// TODO Auto-generated method stub
pw.print(arg0);
}
@Override
public void println() throws IOException {
// TODO Auto-generated method stub
pw.println();
}
@Override
public void println(boolean arg0) throws IOException {
// TODO Auto-generated method stub
pw.println(arg0);
}
@Override
public void println(char arg0) throws IOException {
// TODO Auto-generated method stub
pw.println(arg0);
}
@Override
public void println(int arg0) throws IOException {
// TODO Auto-generated method stub
pw.println(arg0);
}
@Override
public void println(long arg0) throws IOException {
// TODO Auto-generated method stub
pw.println(arg0);
}
@Override
public void println(float arg0) throws IOException {
// TODO Auto-generated method stub
pw.println(arg0);
}
@Override
public void println(double arg0) throws IOException {
// TODO Auto-generated method stub
pw.println(arg0);
}
@Override
public void println(char[] arg0) throws IOException {
// TODO Auto-generated method stub
pw.println(arg0);
}
@Override
public void println(String arg0) throws IOException {
// TODO Auto-generated method stub
pw.println(arg0);
}
@Override
public void println(Object arg0) throws IOException {
// TODO Auto-generated method stub
pw.println(arg0);
}
@Override
public void write(char[] arg0, int arg1, int arg2) throws IOException {
// TODO Auto-generated method stub
pw.write(arg0, arg1, arg2);
}
}