public class Streams extends Object
| Modifier and Type | Method and Description |
|---|---|
static DelayedInputStream |
addDelay(InputStream base,
TickSource tickSource,
long delay,
int bufferSize)
Creates a delayed
InputStream. |
static RateLimitInputStream |
limitRate(InputStream base,
TickSource tickSource,
int bytesPerTick,
int prescale)
Creates a byte-rate-limited
InputStream. |
static RateLimitOutputStream |
limitRate(OutputStream base,
TickSource tickSource,
int bytesPerTick,
int prescaler)
Creates a byte-rate-limited
OutputStream. |
public static RateLimitInputStream limitRate(InputStream base, TickSource tickSource, int bytesPerTick, int prescale)
InputStream. See
RateLimitInputStream.RateLimitInputStream(InputStream, TickSource, int, int)
for detailed information.base - The raw (underlying) InputStreamtickSource - The source of ticksbytesPerTick - (see
RateLimitInputStream.RateLimitInputStream(InputStream, TickSource, int, int)
)prescale - (see
RateLimitInputStream.RateLimitInputStream(InputStream, TickSource, int, int)
)public static RateLimitOutputStream limitRate(OutputStream base, TickSource tickSource, int bytesPerTick, int prescaler)
OutputStream. See
RateLimitOutputStream.RateLimitOutputStream(OutputStream, TickSource, int, int)
for detailed information.base - The raw (underlying) OutputStreamtickSource - The source of ticksbytesPerTick - (see
RateLimitOutputStream.RateLimitOutputStream(OutputStream, TickSource, int, int)
)prescaler - (see
RateLimitOutputStream.RateLimitOutputStream(OutputStream, TickSource, int, int)
)public static DelayedInputStream addDelay(InputStream base, TickSource tickSource, long delay, int bufferSize)
InputStream. See
DelayedInputStream.DelayedInputStream(TickSource, InputStream, long, int)
for detailed information.base - The raw (underlying) InputStream.tickSource - The source of ticksdelay - The delay in ticks to add to the streambufferSize - The buffer size to use (see
DelayedInputStream.DelayedInputStream(TickSource, InputStream, long, int)
)Copyright © 2015. All rights reserved.