|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmarytts.util.data.BaseDoubleDataSource
public class BaseDoubleDataSource
| Field Summary | |
|---|---|
protected long |
dataLength
|
protected DoubleDataSource |
inputSource
|
| Fields inherited from interface marytts.util.data.DoubleDataSource |
|---|
NOT_SPECIFIED |
| Constructor Summary | |
|---|---|
BaseDoubleDataSource()
|
|
BaseDoubleDataSource(DoubleDataSource inputSource)
|
|
| Method Summary | |
|---|---|
int |
available()
The number of doubles that can currently be read from this double data source without blocking. |
double[] |
getAllData()
Get all the data that can be read from this data source, in a single double array. |
int |
getData(double[] target)
Try to get as many double data from this DoubleDataSource as target can hold. |
int |
getData(double[] target,
int targetPos,
int length)
Try to get length doubles from this DoubleDataSource, and copy them into target, starting from targetPos. |
double[] |
getData(int amount)
Request to get the specified amount of data in a new double array. |
long |
getDataLength()
Get the total length of the data in this data source, if available. |
boolean |
hasMoreData()
Whether or not any more data can be read from this data source. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected DoubleDataSource inputSource
protected long dataLength
| Constructor Detail |
|---|
public BaseDoubleDataSource()
public BaseDoubleDataSource(DoubleDataSource inputSource)
| Method Detail |
|---|
public double[] getData(int amount)
getData in interface DoubleDataSourceamount - the number of doubles requested
public int getData(double[] target)
getData in interface DoubleDataSourcetarget - the double array in which to write the data
public int getData(double[] target,
int targetPos,
int length)
getData in interface DoubleDataSourcetarget - the double array to write intotargetPos - position in target where to start writinglength - the amount of data requested
java.lang.IllegalArgumentException - if there is not enough space in target after targetPos to hold length values.public boolean hasMoreData()
hasMoreData in interface DoubleDataSourcepublic int available()
available in interface DoubleDataSourcepublic double[] getAllData()
getAllData in interface DoubleDataSourcejava.lang.OutOfMemoryError - if a sufficiently large double array cannot be created.public long getDataLength()
getDataLength in interface DoubleDataSource
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||