Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

java::io::InputStream Class Reference

This abstract class is the superclass of all classes representing an input stream of bytes. More...

#include <java_io_InputStream.h>

Inheritance diagram for java::io::InputStream:

Inheritance graph
[legend]
Collaboration diagram for java::io::InputStream:

Collaboration graph
[legend]
List of all members.

Public Types

enum  {
  xmogDefaultFlags = xmog_base::GLOBAL, xmogMajorVersion = 3, xmogMinorVersion = 2, xmogPatchVersion = 9,
  xmogBuildNumber = 2047
}
typedef ::xmog_java_array_template<
::java::io::InputStream
array1D
typedef ::xmog_java_array_template<
::xmog_java_array_template<
::java::io::InputStream > > 
array2D

Public Member Functions

virtual jint available (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Returns the number of bytes that can be read (or skipped over) from this input stream without blocking by the next caller of a method for this input stream.
virtual void close (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Closes this input stream and releases any system resources associated with the stream.
 InputStream (::xmog_dummy _use_java_ctor,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
virtual void mark (jint readlimit,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Marks the current position in this input stream.
virtual bool markSupported (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Tests if this input stream supports the mark and reset methods.
virtual jint read (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Reads the next byte of data from the input stream.

Detailed Description

This abstract class is the superclass of all classes representing an input stream of bytes.

Applications that need to define a subclass of InputStream must always provide a method that returns the next byte of input.

Author:
Arthur van Hoff


Constructor & Destructor Documentation

java::io::InputStream::InputStream ::xmog_dummy  _use_java_ctor,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
 

Parameters:
_use_java_ctor indicates that you want to delegate to a Java constructor whose natural proxy conflicts with a C++ requirement.
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.


Member Function Documentation

virtual jint java::io::InputStream::available ::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[virtual]
 

Returns the number of bytes that can be read (or skipped over) from this input stream without blocking by the next caller of a method for this input stream.

The next caller might be the same thread or or another thread.

The available method for class InputStream always returns 0.

This method should be overridden by subclasses.

Parameters:
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
the number of bytes that can be read from this input stream without blocking.

virtual void java::io::InputStream::close ::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[virtual]
 

Closes this input stream and releases any system resources associated with the stream.

The close method of InputStream does nothing.

Parameters:
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:

virtual void java::io::InputStream::mark jint  readlimit,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[virtual]
 

Marks the current position in this input stream.

A subsequent call to the reset method repositions this stream at the last marked position so that subsequent reads re-read the same bytes.

The readlimit arguments tells this input stream to allow that many bytes to be read before the mark position gets invalidated.

The general contract of mark is that, if the method markSupported returns true, the stream somehow remembers all the bytes read after the call to mark and stands ready to supply those same bytes again if and whenever the method reset is called. However, the stream is not required to remember any data at all if more than readlimit bytes are read from the stream before reset is called.

The mark method of InputStream does nothing.

Parameters:
readlimit the maximum limit of bytes that can be read before the mark position becomes invalid.
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:

virtual bool java::io::InputStream::markSupported ::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[virtual]
 

Tests if this input stream supports the mark and reset methods.

Whether or not mark and reset are supported is an invariant property of a particular input stream instance. The markSupported method of InputStream returns false.

Parameters:
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
true if this stream instance supports the mark and reset methods; false otherwise.

virtual jint java::io::InputStream::read ::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[virtual]
 

Reads the next byte of data from the input stream.

The value byte is returned as an int in the range 0 to 255. If no byte is available because the end of the stream has been reached, the value -1 is returned. This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.

A subclass must provide an implementation of this method.

Parameters:
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
the next byte of data, or -1 if the end of the stream is reached.


The documentation for this class was generated from the following file:
Generated on Fri Jun 16 10:19:16 2006 for JMS Courier for C++ by  doxygen 1.4.1