public class DatagramDoubleDataSource extends BufferedDoubleDataSource
Modifier and Type | Field and Description |
---|---|
protected LinkedList<Datagram> |
datagrams |
buf, dataProcessor, DEFAULT_BUFFERSIZE, readPos, writePos
dataLength, inputSource
NOT_SPECIFIED
Constructor and Description |
---|
DatagramDoubleDataSource(Datagram[] datagrams)
Construct an double data source from the given array of datagrams.
|
DatagramDoubleDataSource(LinkedList<Datagram> datagrams)
Construct an double data source from the given array of datagrams.
|
Modifier and Type | Method and Description |
---|---|
int |
available()
The number of doubles that can currently be read from this double data source without blocking.
|
boolean |
hasMoreData()
Whether or not any more data can be read from this data source.
|
protected int |
readDatagram(Datagram d,
double[] target,
int pos) |
protected boolean |
readIntoBuffer(int minLength)
Attempt to get more data from the input source.
|
bufferSpaceLeft, compact, currentlyInBuffer, getData, increaseBufferSize
getAllData, getData, getData, getDataLength
protected LinkedList<Datagram> datagrams
public DatagramDoubleDataSource(Datagram[] datagrams)
datagrams
- datagramspublic DatagramDoubleDataSource(LinkedList<Datagram> datagrams)
datagrams
- datagramspublic boolean hasMoreData()
hasMoreData
in interface DoubleDataSource
hasMoreData
in class BufferedDoubleDataSource
public int available()
available
in interface DoubleDataSource
available
in class BufferedDoubleDataSource
protected boolean readIntoBuffer(int minLength)
readIntoBuffer
in class BufferedDoubleDataSource
minLength
- the amount of data to get from the input sourceprotected int readDatagram(Datagram d, double[] target, int pos)
Copyright © 2000–2016 DFKI GmbH. All rights reserved.