public interface PullSourceStream extends SourceStream
PullDataSourceLENGTH_UNKNOWN| Modifier and Type | Method and Description |
|---|---|
int |
read(byte[] buffer,
int offset,
int length)
Block and read data from the stream.
|
boolean |
willReadBlock()
Find out if data is available now.
|
endOfStream, getContentDescriptor, getContentLengthgetControl, getControlsboolean willReadBlock()
true if a call to read would block
for data.true if read would block; otherwise
returns false.int read(byte[] buffer,
int offset,
int length)
throws IOException
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.
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.read
was called with length 0.IOException - Thrown if an error occurs while reading.Copyright © 2012 code4tv.com. All Rights Reserved.