public class RateLimitInputStream
extends java.io.InputStream
| Constructor and Description |
|---|
RateLimitInputStream(java.io.InputStream inputStream,
com.google.common.util.concurrent.RateLimiter... rateLimiters)
Constructs a new
RateLimitInputStream. |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
public RateLimitInputStream(java.io.InputStream inputStream,
com.google.common.util.concurrent.RateLimiter... rateLimiters)
RateLimitInputStream.inputStream - Original stream to be limitedrateLimiters - RateLimiters to limit Maximal reading bytes per secondpublic int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] b)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreamjava.io.IOExceptionCopyright © 2024. All Rights Reserved.