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)

 

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;

 

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