Class LocalSeekableInputStream
- java.lang.Object
-
- java.io.InputStream
-
- com.sedmelluq.discord.lavaplayer.tools.io.SeekableInputStream
-
- com.sedmelluq.discord.lavaplayer.source.local.LocalSeekableInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class LocalSeekableInputStream extends SeekableInputStream
Seekable input stream implementation for local files.
-
-
Field Summary
-
Fields inherited from class com.sedmelluq.discord.lavaplayer.tools.io.SeekableInputStream
contentLength
-
-
Constructor Summary
Constructors Constructor Description LocalSeekableInputStream(java.io.File file)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()booleancanSeekHard()voidclose()longgetPosition()java.util.List<AudioTrackInfoProvider>getTrackInfoProviders()booleanmarkSupported()intread()intread(byte[] b, int off, int len)voidreset()protected voidseekHard(long position)longskip(long n)-
Methods inherited from class com.sedmelluq.discord.lavaplayer.tools.io.SeekableInputStream
getContentLength, getMaxSkipDistance, seek, skipFully
-
-
-
-
Method Detail
-
read
public int read() throws java.io.IOException- Specified by:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException- Overrides:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
skip
public long skip(long n) 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
-
reset
public void reset() throws java.io.IOException- Overrides:
resetin classjava.io.InputStream- Throws:
java.io.IOException
-
markSupported
public boolean markSupported()
- Overrides:
markSupportedin classjava.io.InputStream
-
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
-
getPosition
public long getPosition()
- Specified by:
getPositionin classSeekableInputStream- Returns:
- Current position in the stream
-
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
-
seekHard
protected void seekHard(long position) throws java.io.IOException- Specified by:
seekHardin classSeekableInputStream- Throws:
java.io.IOException
-
-