Class ResettableBoundedInputStream
- java.lang.Object
-
- java.io.InputStream
-
- com.sedmelluq.discord.lavaplayer.tools.io.ResettableBoundedInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class ResettableBoundedInputStream extends java.io.InputStreamBounded input stream where the limit can be set dynamically.
-
-
Constructor Summary
Constructors Constructor Description ResettableBoundedInputStream(java.io.InputStream delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()voidclose()booleanmarkSupported()intread()intread(byte[] buffer, int offset, int length)voidresetLimit(long limit)Make this input stream return EOF after the specified number of bytes.longskip(long distance)
-
-
-
Method Detail
-
resetLimit
public void resetLimit(long limit)
Make this input stream return EOF after the specified number of bytes.- Parameters:
limit- Maximum number of bytes that can be read.
-
read
public int read() throws java.io.IOException- Specified by:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
read
public int read(byte[] buffer, int offset, int length) throws java.io.IOException- Overrides:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
skip
public long skip(long distance) throws java.io.IOException- Overrides:
skipin classjava.io.InputStream- Throws:
java.io.IOException
-
available
public int available() throws java.io.IOException- Overrides:
availablein classjava.io.InputStream- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.InputStream- Throws:
java.io.IOException
-
markSupported
public boolean markSupported()
- Overrides:
markSupportedin classjava.io.InputStream
-
-