org.jaudiotagger.audio.flac
Class FlacStreamReader
java.lang.Object
org.jaudiotagger.audio.flac.FlacStreamReader
public class FlacStreamReader
- extends java.lang.Object
Flac Stream
Reader files and identifies if this is in fact a flac stream
Constructor Summary |
FlacStreamReader(java.io.RandomAccessFile raf)
Create instance for holding stream info |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FLAC_STREAM_IDENTIFIER_LENGTH
public static final int FLAC_STREAM_IDENTIFIER_LENGTH
- See Also:
- Constant Field Values
FLAC_STREAM_IDENTIFIER
public static final java.lang.String FLAC_STREAM_IDENTIFIER
- See Also:
- Constant Field Values
raf
private java.io.RandomAccessFile raf
startOfFlacInFile
private int startOfFlacInFile
FlacStreamReader
public FlacStreamReader(java.io.RandomAccessFile raf)
- Create instance for holding stream info
- Parameters:
raf
-
findStream
public void findStream()
throws java.io.IOException,
CannotReadException
- Reads the stream block to ensure it is a flac file
- Throws:
java.io.IOException
CannotReadException
isId3v24Tag
private boolean isId3v24Tag()
throws java.io.IOException
- Throws:
java.io.IOException
isId3v23Tag
private boolean isId3v23Tag()
throws java.io.IOException
- Throws:
java.io.IOException
isId3v22Tag
private boolean isId3v22Tag()
throws java.io.IOException
- Throws:
java.io.IOException
isFlacHeader
private boolean isFlacHeader()
throws java.io.IOException
- Throws:
java.io.IOException
getStartOfFlacInFile
public int getStartOfFlacInFile()
- Usually flac header is at start of file, but unofficially and ID3 tag is allowed at the start of the file.
- Returns:
- the start of the Flac within file