Response

You can use the Response object to send output to the client.

public class Response extends OutputStream
{
public void addHeader(String name, String value);
public Boolean getBuffered();
public void setBuffered(Boolean fIsBuffered);
public int getExpires();
public void setExpires(int iExpirationMinutes);
public Date getExpiresAbsolute();
public void setExpiresAbsolute(Date dateExpire);
public String getCharSet();
public void setCharSet(String strCharSet);
public String getContentType();
public void setContentType(String strContentType);
public String getCacheControl();
public void setCacheControl(String strCacheControl);
public String getStatus();
public void setStatus(String strStatus);
public void appendToLog(String s);
public Boolean isClientConnected();
public void end();
public void clear();
public void write(String str);
public void pics(String str);
public void redirect(String str);
// java.io.OutputStream Methods
public void write(int i) throws IOException,
NullPointerException,
IndexOutOfBoundsException;
public void write(byte[] b) throws IOException,
NullPointerException,
IndexOutOfBoundsException;
public void write(byte[] b, int off, int len) throws IOException,
NullPointerException,
IndexOutOfBoundsException;
public void close() throws IOException;
public void flush() throws IOException
};
 

Response Methods

public void addHeader(String name, String value)

Sets the HTML header name to value.

public Boolean getBuffered()
public void setBuffered(Boolean fIsBuffered);

Indicates whether page output is buffered.

public int getExpires();
public void setExpires(int iExpirationMinutes);

Specifies the length of time before a page cached on a browser expires.

public Date getExpiresAbsolute();
public void setExpiresAbsolute(Date dateExpire);

Specifies the date and time on which a page cached on a browser expires.

public String getCharSet()
public void setCharSet(String strCharSet)

Appends the name of the character set to the content-type header.

public String getContentType();
public void setContentType(String strContentType)

Specifies the HTTP content type for the response.

public String getCacheControl()
public void setCacheControl(String strCacheControl)

Specifies the HTTP Cache Control header. You can set this to any legal HTTP Cache Control header value.  By setting the value to TRUE, proxy servers will be able to cache output from ASP pages.

public String getStatus()
public void setStatus(String strStatus)

The value of the status line returned by the server.

public void appendToLog(String s)

Adds a string to the end of the Web server log entry for this request.

public Boolean isClientConnected()

Indicates whether the client has disconnected from the server.

public void end()

Stops processing the .asp file and returns the current result.

public void clear()

Erases any buffered output.

public void pics(String str)

Adds the value of a PICS label to the pics-label field of the response header.

public void redirect(String str)

Sends a redirect message to the browser, causing it to attempt to connect to a different URL.

public void write(String str)

Writes a variable to the current HTTP output as a string. Since the String object is UNICODE, it is first translated to ANSI prior to being sent.

java.io.OutputStream Methods

public void write(int i) throws IOException, NullPointerException, IndexOutOfBoundsException;

Writes a single byte to the HTTP output. The byte is taken from the low-order 8 bits of the argument i.

For more information, see java.io.OutputStream.

public void write(byte[ ] b) throws IOException, NullPointerException, IndexOutOfBoundsException

Writes the bytes contained in the array b, as if each byte, from 0 to b.length-1, were written individually.

For more information, see java.io.OutputStream.

public void write(byte[ ] b, int off, int len) throws IOException, NullPointerException, IndexOutOfBoundsException

Writes the bytes contained in the array b, as if each byte, from off to off+len-1, were written individually.

For more information, see java.io.OutputStream.

public void close() throws IOException

Closes the HTTP output stream.

For more information, see java.io.OutputStream.

public void flush() throws IOException

Causes any data written to the HTTP output stream that has been buffered to be actually sent to the client.

For more information, see java.io.OutputStream.