|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--cnrg.itx.datax.devices.StreamSource
Class implementing a stream source. This class will take any InputStream and
synchronize it to make it a valid Source
.
Field Summary | |
static int |
DEFAULT_BUFFER_TIME
Default buffer time |
static int |
SAMPLE_SIZE
File sample size |
Constructor Summary | |
StreamSource(java.io.InputStream inputStream,
Channel channel)
Constructor to make a StreamSource from any input stream (no flow control) |
|
StreamSource(java.io.InputStream inputStream,
Channel channel,
long bufferTime)
Constructor to make a StreamSource from any input stream (flow control) |
Method Summary | |
void |
close()
Method to close the input stream. |
PropertiesCollection |
getProperties()
Returns a collection of properties supported. |
Stats |
getStatistics()
Method to get the statistics of the input stream. |
boolean |
mute(boolean mute)
Method to mute the input stream. |
void |
run()
Method which acts as a thread and pushes data to the channel. |
void |
setPeerProperties(PropertiesCollection pc)
Interface to set the given properties collection into the device. |
void |
setProperties(PropertiesCollection pc)
Sets the given properties collection into the device |
void |
start()
Method to start the source thread. |
void |
stop()
Method to stop the thread. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int SAMPLE_SIZE
public static final int DEFAULT_BUFFER_TIME
Constructor Detail |
public StreamSource(java.io.InputStream inputStream, Channel channel)
inputStream
- The input Streamchannel
- The audio channelpublic StreamSource(java.io.InputStream inputStream, Channel channel, long bufferTime)
inputStream
- The input Streamchannel
- The audio channelbufferTime
- The amount of data to keep buffered on the output stream in msMethod Detail |
public void close()
public boolean mute(boolean mute)
mute
- true to mute and false to resume the streampublic Stats getStatistics()
public void start()
public void run()
public void stop()
public PropertiesCollection getProperties() throws DataException
public void setProperties(PropertiesCollection pc) throws DataException
public void setPeerProperties(PropertiesCollection pc) throws DataException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |