Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.jempeg.empeg.core
Class FileMagic  view FileMagic download FileMagic.java

java.lang.Object
  extended byorg.jempeg.empeg.core.FileMagic

public class FileMagic
extends java.lang.Object

This class parses audio files to determine their format and tagging, and exposes that information through a common interface. It uses the TFF Enterprises music tagging classes as its implementation of the ID3v1 and ID3v2.2/2.3 standards.

Version:
2.0a1 $Date: 2002/01/06 20:17:59 $

Field Summary
private  java.lang.String myArtist
           
private  java.lang.String myBitrate
           
private  int myByteLength
           
private  java.lang.String myCodec
           
private  java.lang.String myComment
           
private  int myDataOffset
           
private  org.jempeg.empeg.emptool.ImportFileIfc myFile
           
private  java.lang.String myGenreName
           
private  long myLengthInBytes
           
private  int myLengthInMs
           
private  int mySampleRate
           
private  java.lang.String mySource
           
private  int myStatus
           
private  java.lang.String myTitle
           
private  int myTrackNum
           
private  boolean myVBR
           
private  java.lang.String myYear
           
static int STATUS_HAVE_INFO
           
static int STATUS_NO_INFO
           
static int STATUS_PARTIAL_INFO
           
 
Constructor Summary
FileMagic(org.jempeg.empeg.emptool.ImportFileIfc _file)
           
 
Method Summary
 void extractFrameInfo()
           
 void extractTags(java.io.File _file)
          Extracts the ID3 tag from the file and fills in the fields of this class appropriately.
 java.lang.String getArtist()
           
 java.lang.String getBitrate()
           
 long getByteLength()
           
 java.lang.String getCodec()
           
 java.lang.String getComment()
           
 int getDataOffset()
           
 java.lang.String getGenreName()
           
 int getLengthMs()
           
 int getSampleRate()
           
 java.lang.String getSource()
           
 int getStatus()
           
 java.lang.String getTitle()
           
 int getTrackNum()
           
 java.lang.String getYear()
           
 boolean hasAnyInfo()
           
 boolean hasFullInfo()
           
 void identify()
           
 void identifyMP3()
           
 boolean isVBR()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATUS_NO_INFO

public static final int STATUS_NO_INFO
See Also:
Constant Field Values

STATUS_PARTIAL_INFO

public static final int STATUS_PARTIAL_INFO
See Also:
Constant Field Values

STATUS_HAVE_INFO

public static final int STATUS_HAVE_INFO
See Also:
Constant Field Values

myFile

private org.jempeg.empeg.emptool.ImportFileIfc myFile

myStatus

private int myStatus

myCodec

private java.lang.String myCodec

myTitle

private java.lang.String myTitle

myArtist

private java.lang.String myArtist

mySource

private java.lang.String mySource

myComment

private java.lang.String myComment

myGenreName

private java.lang.String myGenreName

myBitrate

private java.lang.String myBitrate

myYear

private java.lang.String myYear

myVBR

private boolean myVBR

myByteLength

private int myByteLength

myDataOffset

private int myDataOffset

mySampleRate

private int mySampleRate

myLengthInMs

private int myLengthInMs

myTrackNum

private int myTrackNum

myLengthInBytes

private long myLengthInBytes
Constructor Detail

FileMagic

public FileMagic(org.jempeg.empeg.emptool.ImportFileIfc _file)
          throws java.io.IOException
Method Detail

getStatus

public int getStatus()

hasAnyInfo

public boolean hasAnyInfo()

hasFullInfo

public boolean hasFullInfo()

getCodec

public java.lang.String getCodec()

getTitle

public java.lang.String getTitle()

getArtist

public java.lang.String getArtist()

getSource

public java.lang.String getSource()

getComment

public java.lang.String getComment()

getGenreName

public java.lang.String getGenreName()

getBitrate

public java.lang.String getBitrate()

getYear

public java.lang.String getYear()

isVBR

public boolean isVBR()

getByteLength

public long getByteLength()

getDataOffset

public int getDataOffset()

getSampleRate

public int getSampleRate()

getLengthMs

public int getLengthMs()

getTrackNum

public int getTrackNum()

identify

public void identify()
              throws java.io.IOException

extractFrameInfo

public void extractFrameInfo()
                      throws java.io.IOException

identifyMP3

public void identifyMP3()
                 throws java.io.IOException

extractTags

public void extractTags(java.io.File _file)
                 throws java.io.IOException
Extracts the ID3 tag from the file and fills in the fields of this class appropriately.