Meet error when extending FileWriter with JDK1.5.0

There is a fragment of Java code as follows:

import java.io.File;

import java.io.FileDescriptor;

import java.io.FileWriter;

import java.io.IOException;

import java.io.Writer;

public class FilterFileWriter extends FileWriter

{

private short _tokenCounter = 0;

private StringBuffer _buffer = new StringBuffer();

private String _pattern = "Bioseq-set";

private String _lastAppend = "";

private boolean _doWrite = true;

public void write(char[] arg0, int arg1, int arg2) throws IOException

{

super.write(arg0, arg1, arg2);

}

public void write(int arg0) throws IOException

{

if( _doWrite )

{

super.write( arg0 );

}

if(_lastAppend.equalsIgnoreCase( _pattern ) && !_doWrite && arg0 == 60 )

{

_doWrite = true;

super.write( arg0 );

_lastAppend = "";

}

}

public void write(String arg0, int arg1, int arg2) throws IOException

{

super.write(arg0, arg1, arg2);

}

public void write(char[] arg0) throws IOException

{

//Launcher.getLoggerInstance().info( "Writing array " + arg0[0] );

super.write(arg0);

}

public void write(String str) throws IOException

{

if( str.equalsIgnoreCase( _pattern ) )

{

if( _lastAppend.equalsIgnoreCase( "</" ) )

{

_doWrite = false;

_lastAppend = str;

return;

}

}

if( str.equalsIgnoreCase( "></" ) )

{

_lastAppend = str;

return;

}

if( _lastAppend.equalsIgnoreCase( "></" ) )

{

super.write( _lastAppend );

}

if( _doWrite )

{

super.write( str );

}

if( str.trim().length() > 0 )

{

_lastAppend = str;

}

}

public void write( String str, boolean force ) throws Exception

{

if( force )

{

super.write( str );

}

}

public FilterFileWriter(File arg0) throws IOException

{

super(arg0);

}

public FilterFileWriter(File arg0, boolean arg1) throws IOException

{

super(arg0, arg1);

}

public FilterFileWriter(FileDescriptor arg0)

{

super(arg0);

}

public FilterFileWriter(String arg0) throws IOException

{

super(arg0);

}

public FilterFileWriter(String arg0, boolean arg1) throws IOException

{

super(arg0, arg1);

}

private boolean hasPattern()

{

return _buffer != null && _buffer.toString().indexOf( _pattern ) >= 0;

}

}

When compiling, meet following error:

The return type is incompatible with Appendable.append(char), Writer.append(char),Writer.append(char)

Why? and How to resolve this error?

Thanks a lot!

[2873 byte] By [CollinChua] at [2007-10-1 4:20:24]
# 1
All I can tell you is it compiles clean using 1.5.0_01Make sure you're not using a beta release.
ChuckBinga at 2007-7-9 4:50:43 > top of Java-index,Administration Tools,Sun Connection...
# 2
Did you ever find a solution to this problem? I just installed jdk 1.5_03 and I get the following error from a class that does not have any of the methods described in the error below.The return type is incompatible with Appendable.append(char), Writer.append(char),
blaplantea at 2007-7-9 4:50:43 > top of Java-index,Administration Tools,Sun Connection...
# 3
This error is most likely due to you using Java 1.5 libaries and compiling with a pre-Java 1.5 compiler.
vineet_sinhaa at 2007-7-9 4:50:43 > top of Java-index,Administration Tools,Sun Connection...