org.gagravarr.flac
Class FlacNativeFile
java.lang.Object
org.gagravarr.flac.FlacFile
org.gagravarr.flac.FlacNativeFile
public class FlacNativeFile
- extends FlacFile
This lets you work with FLAC files that
are contained in a native FLAC Stream
Method Summary |
void |
close()
In Reading mode, will close the underlying ogg/flac
file and free its resources. |
FlacAudioFrame |
getNextAudioPacket()
|
void |
skipToGranule(long granulePosition)
Skips the audio data to the next packet with a granule
of at least the given granule position. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FlacNativeFile
public FlacNativeFile(File f)
throws IOException,
FileNotFoundException
- Opens the given file for reading
- Throws:
IOException
FileNotFoundException
FlacNativeFile
public FlacNativeFile(InputStream inp)
throws IOException
- Opens the given FLAC file
- Throws:
IOException
getNextAudioPacket
public FlacAudioFrame getNextAudioPacket()
throws IOException
- Specified by:
getNextAudioPacket
in class FlacFile
- Throws:
IOException
skipToGranule
public void skipToGranule(long granulePosition)
throws IOException
- Skips the audio data to the next packet with a granule
of at least the given granule position.
Note that skipping backwards is not currently supported!
- Specified by:
skipToGranule
in class FlacFile
- Throws:
IOException
close
public void close()
throws IOException
- In Reading mode, will close the underlying ogg/flac
file and free its resources.
In Writing mode, will write out the Info and
Comments objects, and then the audio data.
- Specified by:
close
in class FlacFile
- Throws:
IOException
Copyright © 2012. All Rights Reserved.