An entity that generates random data. This is an outgoing entity, it supports writeTo but not getContent.
Constructor and description |
---|
RandomEntity
(long len) Creates a new entity generating the given amount of data. |
Type Params | Return Type | Name and description |
---|---|---|
|
java.io.InputStream |
getContent() Not supported. |
|
long |
getContentLength() Obtains the size of the random data. |
|
boolean |
isRepeatable() Tells that this entity is repeatable, in a way. |
|
boolean |
isStreaming() Tells that this entity is not streaming. |
|
void |
writeTo(java.io.OutputStream out) Generates the random content. |
Creates a new entity generating the given amount of data.
len
- the number of random bytes to generate, 0 to maxintNot supported. This method throws an exception.
Obtains the size of the random data.
Tells that this entity is repeatable, in a way. Repetitions will generate different random data, unless perchance the same random data is generated twice.
true
Tells that this entity is not streaming.
Generates the random content.
out
- where to write the content to