All Packages Class Hierarchy This Package Previous Next Index
Class ejmf.toolkit.io.PullSourceInputStream
java.lang.Object
|
+----java.io.InputStream
|
+----ejmf.toolkit.io.PullSourceInputStream
- public class PullSourceInputStream
- extends InputStream
The PullSourceInputStream class wraps a java.io.InputStream
around a javax.media.protocol.PullSourceStream, allowing
conventional I/O to access media data.
- See Also:
- PushSourceStream
-
PullSourceInputStream(PullSourceStream)
- Constructs a PullSourceInputStream for the given
PullSourceStream.
-
getPullSourceStream()
- Get the PullSourceStream for this PullSourceInputStream.
-
read()
- Reads the next byte of data from this input stream.
-
read(byte[], int, int)
- A standard implementation of the InputStream.read() method.
PullSourceInputStream
public PullSourceInputStream(PullSourceStream stream)
- Constructs a PullSourceInputStream for the given
PullSourceStream.
read
public int read() throws IOException
- Reads the next byte of data from this 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 is directly from
the InputStream API.
- Returns:
- The next byte of data, or -1 if the end of the
stream is reached.
- Throws: IOException
- if an I/O error occurs.
- Overrides:
- read in class InputStream
read
public int read(byte b[],
int off,
int len) throws IOException
- A standard implementation of the InputStream.read() method.
- Parameters:
- b[]
- The byte array into which to read data.
- off
- The offset in the array to begin writing data.
- len
- The number of bytes to read.
- Returns:
- The number of bytes read, or -1 if the end of
the stream.
- Throws: IOException
- If an I/O error occurs while reading.
- Overrides:
- read in class InputStream
getPullSourceStream
public PullSourceStream getPullSourceStream()
- Get the PullSourceStream for this PullSourceInputStream.
All Packages Class Hierarchy This Package Previous Next Index