Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

sosc::StreamTool Class Reference

List of all members.

Static Public Methods

long dumpStream (InputStream in, OutputStream out) throws Exception
long dumpStream (InputStream in, OutputStream out, int bufferSize) throws Exception

Public Attributes

Logger logger = Logger.getLogger("net.threebit.utils.sosc")

Static Public Attributes

int DUMP_STREAM_BUFFER_SIZE = 32*1024

Detailed Description

A collection of methods for handling streams

Definition at line 30 of file StreamTool.java.


Member Function Documentation

long sosc::StreamTool::dumpStream InputStream    in,
OutputStream    out,
int    bufferSize
throws Exception [inline, static]
 

Same as dumpStream (InputStream in, OutputStream out) but allows direct control of the byte[] buffer size. The stream states are not modified except for calls to read/write.

Parameters:
in  The inputstream to read from. If null then no data is read.
out  The outputstream to write to. Can be null if in is null.
bufferSize  The size of the byte[] buffer that should be used.
Returns:
The number of bytes transferred.

Definition at line 58 of file StreamTool.java.

long sosc::StreamTool::dumpStream InputStream    in,
OutputStream    out
throws Exception [inline, static]
 

Reads all available data from the input stream and writes it to the provided output stream. Uses the default buffer size.

Returns:
The number of bytes transfered.

Definition at line 44 of file StreamTool.java.

References sosc::StreamTool::DUMP_STREAM_BUFFER_SIZE.


Member Data Documentation

int sosc::StreamTool::DUMP_STREAM_BUFFER_SIZE = 32*1024 [static]
 

Default buffer size used in dumpStream* methods. Default value is 32kB

Definition at line 36 of file StreamTool.java.

Referenced by sosc::StreamTool::dumpStream().

Logger sosc::StreamTool::logger = Logger.getLogger("net.threebit.utils.sosc")
 

Debugging.

Definition at line 33 of file StreamTool.java.


The documentation for this class was generated from the following file:
Generated on Mon Jul 14 17:19:22 2003 for SOSC by doxygen1.2.15