Package com.aoindustries.io
Class BitRateInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- com.aoindustries.io.BitRateInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class BitRateInputStream extends FilterInputStream
ABitRateInputStreamregulates anInputStreamto a specific bit rate. Please note that this class is not synchronized so it should only be used from a single Thread or should be synchronized enternally.- Author:
- AO Industries, Inc.
-
-
Field Summary
Fields Modifier and Type Field Description static longMAX_CATCHUP_TIME-
Fields inherited from class java.io.FilterInputStream
in
-
-
Constructor Summary
Constructors Constructor Description BitRateInputStream(InputStream out, BitRateProvider provider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()intread()intread(byte[] buff)intread(byte[] buff, int off, int len)-
Methods inherited from class java.io.FilterInputStream
available, mark, markSupported, reset, skip
-
-
-
-
Field Detail
-
MAX_CATCHUP_TIME
public static final long MAX_CATCHUP_TIME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BitRateInputStream
public BitRateInputStream(InputStream out, BitRateProvider provider)
-
-
Method Detail
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterInputStream- Throws:
IOException
-
read
public int read() throws IOException- Overrides:
readin classFilterInputStream- Throws:
IOException
-
read
public int read(byte[] buff) throws IOException- Overrides:
readin classFilterInputStream- Throws:
IOException
-
read
public int read(byte[] buff, int off, int len) throws IOException- Overrides:
readin classFilterInputStream- Throws:
IOException
-
-