- All Known Implementing Classes:
- public interface PullSourceStream
- extends SourceStream
Abstracts a read interface that data is pulled from.
- See Also:
Block and read data from the stream.
Find out if data is available now.
public boolean willReadBlock()
- Find out if data is available now.
true if a call to
read would block
true if read would block; otherwise
public int read(byte buffer,
- 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
length of 0.
buffer - The buffer to read bytes into.
offset - The offset into the buffer at which to begin writing data.
length - The number of bytes to read.
- The number of bytes read, -1 indicating
the end of stream, or 0 indicating
was called with
- java.io.IOException - Thrown if an error occurs while reading.
Submit a bug or feature
Copyright 1999-2000 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved. See the Specification License for more details.
Sun, Sun Microsystems, and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.