org.gagravarr.flac
Class FlacNativeFile

java.lang.Object
  extended by org.gagravarr.flac.FlacFile
      extended by org.gagravarr.flac.FlacNativeFile

public class FlacNativeFile
extends FlacFile

This lets you work with FLAC files that are contained in a native FLAC Stream


Field Summary
 
Fields inherited from class org.gagravarr.flac.FlacFile
info, otherMetadata, tags
 
Constructor Summary
FlacNativeFile(File f)
          Opens the given file for reading
FlacNativeFile(InputStream inp)
          Opens the given FLAC file
 
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 org.gagravarr.flac.FlacFile
getInfo, getTags, open, open, open
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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
Method Detail

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.