net.sf.fmj.media.multiplexer
Class InputStreamPushSourceStream
java.lang.Object
net.sf.fmj.media.multiplexer.InputStreamPushSourceStream
- All Implemented Interfaces:
- Controls, PushSourceStream, SourceStream
public class InputStreamPushSourceStream
- extends java.lang.Object
- implements PushSourceStream
Adapater from InputStream
to PushSourceStream
.
- Author:
- Ken Larson
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InputStreamPushSourceStream
public InputStreamPushSourceStream(ContentDescriptor outputContentDescriptor,
java.io.InputStream is)
getMinimumTransferSize
public int getMinimumTransferSize()
- Specified by:
getMinimumTransferSize
in interface PushSourceStream
read
public int read(byte[] buffer,
int offset,
int length)
throws java.io.IOException
- Description copied from interface:
PushSourceStream
- According to API: Read from the stream without blocking. Returns -1 when the end of the media is reached.
This implies that it can return zero if there is no data available.
- Specified by:
read
in interface PushSourceStream
- Throws:
java.io.IOException
setTransferHandler
public void setTransferHandler(SourceTransferHandler transferHandler)
- Specified by:
setTransferHandler
in interface PushSourceStream
notifyDataAvailable
public void notifyDataAvailable()
endOfStream
public boolean endOfStream()
- Specified by:
endOfStream
in interface SourceStream
getContentDescriptor
public ContentDescriptor getContentDescriptor()
- Specified by:
getContentDescriptor
in interface SourceStream
getContentLength
public long getContentLength()
- Specified by:
getContentLength
in interface SourceStream
getControl
public java.lang.Object getControl(java.lang.String controlType)
- Specified by:
getControl
in interface Controls
getControls
public java.lang.Object[] getControls()
- Specified by:
getControls
in interface Controls