GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  SERVLET::SERVLETOUTPUTSTREAM (3)

.ds Aq ’

NAME

Servlet::ServletOutputStream - servlet output stream interface

CONTENTS

SYNOPSIS



  $stream->print($string);

  $stream->println();
  $stream->println($string);

  $stream->write($string);
  $stream->write($string, $length);
  $stream->write($string, $length, $offset);

  $stream->flush();

  $stream->close();



DESCRIPTION

Provides an output stream for writing binary data to a servlet response.

An output stream object is normally retrieved via getOutputStream in Servlet::ServletResponse.

<B>NOTE:B> While this is an abstract class in the Java API, the Perl API provides it as an interface. The main difference is that the Perl version has no constructor. Also, it merges the methods declared in <B>java.io.OutputStreamB> and <B>javax.servlet.ServletOutputStreamB> into a single interface.

METHODS

close() Closes the stream and releases any system resources associated with the stream.

<B>Throws:B>
<B>Servlet::Util::IOExceptionB> if an output exception occurred

flush() Flushes this input stream and forces any buffered output bytes to be written out.

<B>Throws:B>
<B>Servlet::Util::IOExceptionB> if an output exception occurred

print($value) Writes a scalar value to the client, with no carriage return-line feed (CRLF) character at the end.

<B>Parameters:B>
$value the value to send to the client

<B>Throws:B>
<B>Servlet::Util::IOExceptionB> if an output exception occurred

println([$value]) Writes a scalar value to the client, if specified, followed by a carriage return-line feed (CRLF) character.

<B>Parameters:B>
$value the (optional) value to send to the client

<B>Throws:B>
<B>Servlet::Util::IOExceptionB> if an output exception occurred

write($value)
write($value, $length)
write($value, $length, $offset) Writes the scalar $value to the stream.

If no arguments are specified, functions exactly equivalently to print().

If $length is specified, writes that many bytes from $value. If $offset is specified, starts writing that many bytes from the beginning of $value. $offset and $length must not be negative, and $length must not be greater than the amount of data in $value starting from $offset.

Blocks until input data is available, the end of the stream is detected, or an exception is thrown.

<B>Parameters:B>
$value a scalar value to be written
$length the maximum number of bytes to write
$offset the location in $value where data is read from

<B>Throws:B>
<B>Servlet::Util::IOExceptionB> if an input exception occurs
<B>Servlet::Util::IndexOutOfBoundsExceptionB> if $buffer is specified as undef

SEE ALSO

Servlet::ServletResponse, Servlet::Util::Exception

AUTHOR

Brian Moseley, bcm@maz.org
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 SERVLET::SERVLETOUTPUTSTREAM (3) 2001-07-13

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.