바로 ResponseWriterWrapper
클래스를 만드십시오.
public abstract class ResponseWriterWrapper extends ResponseWriter {
public abstract ResponseWriter getWrapped();
@Override
public String getContentType() {
return getWrapped().getContentType();
}
@Override
public String getCharacterEncoding() {
return getWrapped().getCharacterEncoding();
}
@Override
public void flush() throws IOException {
getWrapped().flush();
}
@Override
public void startDocument() throws IOException {
getWrapped().startDocument();
}
// Etc... Just override all abstract methods of ResponseWriter
// and delegate the call to getWrapped(). There are 15 of them.
}
기본적으로 편리한 클래스이므로 하나 또는 두 개의 메소드 만 필요할 때마다 15 개의 모든 추상 메소드를 구현할 필요가 없습니다.
감사합니다. 이걸 시도하고 돌아올거야. –