FileDocCategorySizeDatePackage
PullSourceStream.javaAPI DocJMF 2.1.1e1578Mon May 12 12:20:42 BST 2003javax.media.protocol

PullSourceStream

public interface PullSourceStream implements SourceStream
Abstracts a read interface that data is pulled from.
see
PullDataSource

Fields Summary
Constructors Summary
Methods Summary
public intread(byte[] buffer, int offset, int length)
Block and read data from the stream.

Reads up to length bytes from the input stream into an array of bytes. If the first argument is null, up to length bytes are read and discarded. Returns -1 when the end of the media is reached. This method only returns 0 if it was called with a length of 0.

param
buffer The buffer to read bytes into.
param
offset The offset into the buffer at which to begin writing data.
param
length The number of bytes to read.
return
The number of bytes read, -1 indicating the end of stream, or 0 indicating read was called with length 0.
throws
IOException Thrown if an error occurs while reading.

public booleanwillReadBlock()
Find out if data is available now. Returns true if a call to read would block for data.

return
Returns true if read would block; otherwise returns false.