|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdatasource.DataSource
datasource.NullSource
public class NullSource
A NullSource is a source that returns zeroes, as fast as it can. It's so simple it needs no comments...
Field Summary | |
---|---|
private int |
bytesLeftToSend
bytesLeftToSend is how many bytes remain to be sent this use of this Null source. |
private int |
mySize
mySize is how many bytes this Null source should send in total. |
Fields inherited from class datasource.DataSource |
---|
CLOSED, CONNECTED, STARTING, state |
Constructor Summary | |
---|---|
NullSource(int bytesToSend)
|
Method Summary | |
---|---|
protected int |
readFromSrc(byte[] buf,
int len)
We're a null source, so we don't actually read anything. |
void |
reInit()
All derived classes must be capable of reinitializing themselves. |
Methods inherited from class datasource.DataSource |
---|
read, readyToRead |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private int mySize
private int bytesLeftToSend
Constructor Detail |
---|
public NullSource(int bytesToSend)
Method Detail |
---|
public void reInit()
DataSource
reInit
in class DataSource
protected int readFromSrc(byte[] buf, int len)
readFromSrc
in class DataSource
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |