|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpmp.io.RandomInputSource
public class RandomInputSource
This class allows to give random data as input to macroprocessor.
Title: PMP: Macroprocessor
Description: Java macroprocessor
Copyright: Copyright (c) 2005
Constructor Summary | |
---|---|
RandomInputSource(java.util.Random source,
int length)
|
Method Summary | |
---|---|
void |
close()
Closes source. |
java.lang.String |
read(int maxLength)
Reads up to length bytes from input. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RandomInputSource(java.util.Random source, int length)
Method Detail |
---|
public java.lang.String read(int maxLength)
InputSource
length
bytes from input.
If end of source was reached (end of file, socket closed or something like that)
returns empty string.
read
in interface InputSource
maxLength
- maximal length of result; must not be zero!
public void close()
InputSource
read
after
calling this method.
close
in interface java.io.Closeable
close
in interface InputSource
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |