Method from org.apache.catalina.connector.ResponseFacade Detail: |
public void addCookie(Cookie cookie) {
if (isCommitted())
return;
response.addCookie(cookie);
}
|
public void addDateHeader(String name,
long date) {
if (isCommitted())
return;
if(Globals.IS_SECURITY_ENABLED) {
AccessController.doPrivileged(new DateHeaderPrivilegedAction
(name, date, true));
} else {
response.addDateHeader(name, date);
}
}
|
public void addHeader(String name,
String value) {
if (isCommitted())
return;
response.addHeader(name, value);
}
|
public void addIntHeader(String name,
int value) {
if (isCommitted())
return;
response.addIntHeader(name, value);
}
|
public void clear() {
response = null;
}
|
protected Object clone() throws CloneNotSupportedException {
throw new CloneNotSupportedException();
}
Prevent cloning the facade. |
public boolean containsHeader(String name) {
if (response == null) {
throw new IllegalStateException(
sm.getString("responseFacade.nullResponse"));
}
return response.containsHeader(name);
}
|
public String encodeRedirectURL(String url) {
if (response == null) {
throw new IllegalStateException(
sm.getString("responseFacade.nullResponse"));
}
return response.encodeRedirectURL(url);
}
|
public String encodeRedirectUrl(String url) {
if (response == null) {
throw new IllegalStateException(
sm.getString("responseFacade.nullResponse"));
}
return response.encodeRedirectURL(url);
}
|
public String encodeURL(String url) {
if (response == null) {
throw new IllegalStateException(
sm.getString("responseFacade.nullResponse"));
}
return response.encodeURL(url);
}
|
public String encodeUrl(String url) {
if (response == null) {
throw new IllegalStateException(
sm.getString("responseFacade.nullResponse"));
}
return response.encodeURL(url);
}
|
public void finish() {
if (response == null) {
throw new IllegalStateException(
sm.getString("responseFacade.nullResponse"));
}
response.setSuspended(true);
}
|
public void flushBuffer() throws IOException {
if (isFinished())
// throw new IllegalStateException
// (/*sm.getString("responseFacade.finished")*/);
return;
if (SecurityUtil.isPackageProtectionEnabled()){
try{
AccessController.doPrivileged(new PrivilegedExceptionAction(){
public Object run() throws IOException{
response.setAppCommitted(true);
response.flushBuffer();
return null;
}
});
} catch(PrivilegedActionException e){
Exception ex = e.getException();
if (ex instanceof IOException){
throw (IOException)ex;
}
}
} else {
response.setAppCommitted(true);
response.flushBuffer();
}
}
|
public int getBufferSize() {
if (response == null) {
throw new IllegalStateException(
sm.getString("responseFacade.nullResponse"));
}
return response.getBufferSize();
}
|
public String getCharacterEncoding() {
if (response == null) {
throw new IllegalStateException(
sm.getString("responseFacade.nullResponse"));
}
return response.getCharacterEncoding();
}
|
public String getContentType() {
if (response == null) {
throw new IllegalStateException(
sm.getString("responseFacade.nullResponse"));
}
return response.getContentType();
}
|
public Locale getLocale() {
if (response == null) {
throw new IllegalStateException(
sm.getString("responseFacade.nullResponse"));
}
return response.getLocale();
}
|
public ServletOutputStream getOutputStream() throws IOException {
// if (isFinished())
// throw new IllegalStateException
// (/*sm.getString("responseFacade.finished")*/);
ServletOutputStream sos = response.getOutputStream();
if (isFinished())
response.setSuspended(true);
return (sos);
}
|
public PrintWriter getWriter() throws IOException {
// if (isFinished())
// throw new IllegalStateException
// (/*sm.getString("responseFacade.finished")*/);
PrintWriter writer = response.getWriter();
if (isFinished())
response.setSuspended(true);
return (writer);
}
|
public boolean isCommitted() {
if (response == null) {
throw new IllegalStateException(
sm.getString("responseFacade.nullResponse"));
}
return (response.isAppCommitted());
}
|
public boolean isFinished() {
if (response == null) {
throw new IllegalStateException(
sm.getString("responseFacade.nullResponse"));
}
return response.isSuspended();
}
|
public void reset() {
if (isCommitted())
throw new IllegalStateException
(/*sm.getString("responseBase.reset.ise")*/);
response.reset();
}
|
public void resetBuffer() {
if (isCommitted())
throw new IllegalStateException
(/*sm.getString("responseBase.reset.ise")*/);
response.resetBuffer();
}
|
public void sendError(int sc) throws IOException {
if (isCommitted())
throw new IllegalStateException
(/*sm.getString("responseBase.reset.ise")*/);
response.setAppCommitted(true);
response.sendError(sc);
}
|
public void sendError(int sc,
String msg) throws IOException {
if (isCommitted())
throw new IllegalStateException
(/*sm.getString("responseBase.reset.ise")*/);
response.setAppCommitted(true);
response.sendError(sc, msg);
}
|
public void sendRedirect(String location) throws IOException {
if (isCommitted())
throw new IllegalStateException
(/*sm.getString("responseBase.reset.ise")*/);
response.setAppCommitted(true);
response.sendRedirect(location);
}
|
public void setBufferSize(int size) {
if (isCommitted())
throw new IllegalStateException
(/*sm.getString("responseBase.reset.ise")*/);
response.setBufferSize(size);
}
|
public void setCharacterEncoding(String arg0) {
if (response == null) {
throw new IllegalStateException(
sm.getString("responseFacade.nullResponse"));
}
response.setCharacterEncoding(arg0);
}
|
public void setContentLength(int len) {
if (isCommitted())
return;
response.setContentLength(len);
}
|
public void setContentType(String type) {
if (isCommitted())
return;
if (SecurityUtil.isPackageProtectionEnabled()){
AccessController.doPrivileged(new SetContentTypePrivilegedAction(type));
} else {
response.setContentType(type);
}
}
|
public void setDateHeader(String name,
long date) {
if (isCommitted())
return;
if(Globals.IS_SECURITY_ENABLED) {
AccessController.doPrivileged(new DateHeaderPrivilegedAction
(name, date, false));
} else {
response.setDateHeader(name, date);
}
}
|
public void setHeader(String name,
String value) {
if (isCommitted())
return;
response.setHeader(name, value);
}
|
public void setIntHeader(String name,
int value) {
if (isCommitted())
return;
response.setIntHeader(name, value);
}
|
public void setLocale(Locale loc) {
if (isCommitted())
return;
response.setLocale(loc);
}
|
public void setStatus(int sc) {
if (isCommitted())
return;
response.setStatus(sc);
}
|
public void setStatus(int sc,
String sm) {
if (isCommitted())
return;
response.setStatus(sc, sm);
}
|