|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
com.lti.utils.synchronization.CloseableThread
net.sf.fmj.media.rtp.SimpleSocketInputStream
public class SimpleSocketInputStream
A DatagramSocket Input Stream Adapter
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class com.lti.utils.synchronization.CloseableThread |
---|
closing |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Fields inherited from interface javax.media.protocol.SourceStream |
---|
LENGTH_UNKNOWN |
Constructor Summary | |
---|---|
SimpleSocketInputStream(java.net.DatagramSocket socket)
Creates a new SocketInputStream |
Method Summary | |
---|---|
boolean |
endOfStream()
Have we reached the end of stream? |
ContentDescriptor |
getContentDescriptor()
Returns the content descriptor. |
long |
getContentLength()
Returns the content's length. |
java.lang.Object |
getControl(java.lang.String controlType)
DUMMY. |
java.lang.Object[] |
getControls()
DUMMY. |
int |
getMinimumTransferSize()
Returns the minimum transfer size. |
void |
kill()
Stops the socket |
void |
notifyTransferHandlerAsync()
|
int |
read(byte[] buffer,
int offset,
int length)
Read a datagram packet and write it into the provided buffer. |
void |
run()
Walk... |
void |
setTransferHandler(SourceTransferHandler transferHandler)
Sets the transfer handler for this stream. |
Methods inherited from class com.lti.utils.synchronization.CloseableThread |
---|
close, isClosed, isClosing, setClosed, setClosing, waitUntilClosed |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SimpleSocketInputStream(java.net.DatagramSocket socket)
socket
- The socket to handleMethod Detail |
---|
public int read(byte[] buffer, int offset, int length) throws java.io.IOException
read
in interface PushSourceStream
buffer
- the buffer to write the packets tooffset
- offset after which we can writelength
- total length
java.io.IOException
public int getMinimumTransferSize()
getMinimumTransferSize
in interface PushSourceStream
public void setTransferHandler(SourceTransferHandler transferHandler)
setTransferHandler
in interface PushSourceStream
transferHandler
- the transfer handlerpublic void notifyTransferHandlerAsync() throws java.lang.InterruptedException
java.lang.InterruptedException
public ContentDescriptor getContentDescriptor()
getContentDescriptor
in interface SourceStream
public long getContentLength()
getContentLength
in interface SourceStream
public boolean endOfStream()
endOfStream
in interface SourceStream
public java.lang.Object[] getControls()
getControls
in interface Controls
public java.lang.Object getControl(java.lang.String controlType)
getControl
in interface Controls
controlType
- UNUSED.
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void kill()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |