public abstract class Response extends Object
The implementation may not support calling both write(byte[])
and
write(CharSequence)
on the same Response
instance.
Constructor and Description |
---|
Response() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the response
|
abstract String |
encodeURL(CharSequence url)
Encodes the specified URL by including the session ID in it, or, if encoding is not needed,
returns the URL unchanged.
|
abstract Object |
getContainerResponse()
Provides access to the low-level container response object that implementaion of this
Response delegate to. |
OutputStream |
getOutputStream()
Returns an
OutputStream suitable for writing binary data in the response. |
void |
reset()
Called when the Response needs to reset itself.
|
abstract void |
write(byte[] array)
Writes the buffer to output.
|
abstract void |
write(byte[] array,
int offset,
int length)
Writes the buffer to output.
|
abstract void |
write(CharSequence sequence)
Writes the
CharSequence to output. |
public abstract void write(CharSequence sequence)
CharSequence
to output.sequence
- IllegalStateException
- if write(byte[])
has already been called on this instancepublic abstract void write(byte[] array)
array
- the data.IllegalStateException
- if write(CharSequence)
has already been called on this instancepublic abstract void write(byte[] array, int offset, int length)
array
- the data.offset
- the start offset in the data.length
- the number of bytes to write.IllegalStateException
- if write(CharSequence)
has already been called on this instancepublic void close()
public abstract String encodeURL(CharSequence url)
url
- public void reset()
public abstract Object getContainerResponse()
Response
delegate to. This allows users to access features provided by the container
response but not by generalized Wicket Response
objects.null
if nonepublic OutputStream getOutputStream()
OutputStream
suitable for writing binary data in the response. The servlet
container does not encode the binary data.
Calling flush() on the OutputStream commits the response.
This method returns an output stream that delegates to write(byte[])
,
write(byte[], int, int)
, and close()
methods of this response instance
Copyright © 2006–2021 Apache Software Foundation. All rights reserved.