Class NonSeekableInputStream
- java.lang.Object
-
- java.io.InputStream
-
- com.sedmelluq.discord.lavaplayer.tools.io.SeekableInputStream
-
- com.sedmelluq.discord.lavaplayer.tools.io.NonSeekableInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class NonSeekableInputStream extends SeekableInputStream
-
-
Field Summary
-
Fields inherited from class com.sedmelluq.discord.lavaplayer.tools.io.SeekableInputStream
contentLength
-
-
Constructor Summary
Constructors Constructor Description NonSeekableInputStream(java.io.InputStream delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanSeekHard()voidclose()longgetPosition()java.util.List<AudioTrackInfoProvider>getTrackInfoProviders()intread()intread(byte[] buffer, int offset, int length)protected voidseekHard(long position)-
Methods inherited from class com.sedmelluq.discord.lavaplayer.tools.io.SeekableInputStream
getContentLength, getMaxSkipDistance, seek, skipFully
-
-
-
-
Method Detail
-
getPosition
public long getPosition()
- Specified by:
getPositionin classSeekableInputStream- Returns:
- Current position in the stream
-
seekHard
protected void seekHard(long position)
- Specified by:
seekHardin classSeekableInputStream
-
canSeekHard
public boolean canSeekHard()
- Specified by:
canSeekHardin classSeekableInputStream- Returns:
trueif it is possible to seek to an arbitrary position in this stream, even when it is behind the current position.
-
getTrackInfoProviders
public java.util.List<AudioTrackInfoProvider> getTrackInfoProviders()
- Specified by:
getTrackInfoProvidersin classSeekableInputStream
-
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
-
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
-
-