Package com.mpatric.mp3agic
Class Mp3File
java.lang.Object
com.mpatric.mp3agic.FileWrapper
com.mpatric.mp3agic.Mp3File
public class Mp3File extends FileWrapper
-
Field Summary
Fields Modifier and Type Field Description protected int
bufferLength
-
Constructor Summary
Constructors Modifier Constructor Description protected
Mp3File()
Mp3File(File file)
Mp3File(File file, int bufferLength)
Mp3File(File file, int bufferLength, boolean scanFile)
Mp3File(String filename)
Mp3File(String filename, boolean scanFile)
Mp3File(String filename, int bufferLength)
Mp3File(String filename, int bufferLength, boolean scanFile)
Mp3File(Path path)
Mp3File(Path path, int bufferLength)
Mp3File(Path path, int bufferLength, boolean scanFile)
-
Method Summary
Modifier and Type Method Description int
getBitrate()
Map<Integer,MutableInteger>
getBitrates()
String
getChannelMode()
byte[]
getCustomTag()
String
getEmphasis()
int
getEndOffset()
int
getFrameCount()
ID3v1
getId3v1Tag()
ID3v2
getId3v2Tag()
String
getLayer()
long
getLengthInMilliseconds()
long
getLengthInSeconds()
String
getModeExtension()
int
getSampleRate()
int
getStartOffset()
String
getVersion()
int
getXingBitrate()
int
getXingOffset()
boolean
hasCustomTag()
boolean
hasId3v1Tag()
boolean
hasId3v2Tag()
boolean
hasXingFrame()
boolean
isCopyright()
boolean
isOriginal()
boolean
isVbr()
protected int
preScanFile(SeekableByteChannel seekableByteChannel)
void
removeCustomTag()
void
removeId3v1Tag()
void
removeId3v2Tag()
void
save(String newFilename)
void
setCustomTag(byte[] customTag)
void
setId3v1Tag(ID3v1 id3v1Tag)
void
setId3v2Tag(ID3v2 id3v2Tag)
Methods inherited from class com.mpatric.mp3agic.FileWrapper
getFilename, getLastModified, getLength
-
Field Details
-
bufferLength
protected int bufferLength
-
-
Constructor Details
-
Mp3File
protected Mp3File() -
Mp3File
-
Mp3File
public Mp3File(String filename, int bufferLength) throws IOException, UnsupportedTagException, InvalidDataException -
Mp3File
public Mp3File(String filename, boolean scanFile) throws IOException, UnsupportedTagException, InvalidDataException -
Mp3File
public Mp3File(String filename, int bufferLength, boolean scanFile) throws IOException, UnsupportedTagException, InvalidDataException -
Mp3File
-
Mp3File
public Mp3File(File file, int bufferLength) throws IOException, UnsupportedTagException, InvalidDataException -
Mp3File
public Mp3File(File file, int bufferLength, boolean scanFile) throws IOException, UnsupportedTagException, InvalidDataException -
Mp3File
-
Mp3File
public Mp3File(Path path, int bufferLength) throws IOException, UnsupportedTagException, InvalidDataException -
Mp3File
public Mp3File(Path path, int bufferLength, boolean scanFile) throws IOException, UnsupportedTagException, InvalidDataException
-
-
Method Details
-
preScanFile
-
getFrameCount
public int getFrameCount() -
getStartOffset
public int getStartOffset() -
getEndOffset
public int getEndOffset() -
getLengthInMilliseconds
public long getLengthInMilliseconds() -
getLengthInSeconds
public long getLengthInSeconds() -
isVbr
public boolean isVbr() -
getBitrate
public int getBitrate() -
getBitrates
-
getChannelMode
-
isCopyright
public boolean isCopyright() -
getEmphasis
-
getLayer
-
getModeExtension
-
isOriginal
public boolean isOriginal() -
getSampleRate
public int getSampleRate() -
getVersion
-
hasXingFrame
public boolean hasXingFrame() -
getXingOffset
public int getXingOffset() -
getXingBitrate
public int getXingBitrate() -
hasId3v1Tag
public boolean hasId3v1Tag() -
getId3v1Tag
-
setId3v1Tag
-
removeId3v1Tag
public void removeId3v1Tag() -
hasId3v2Tag
public boolean hasId3v2Tag() -
getId3v2Tag
-
setId3v2Tag
-
removeId3v2Tag
public void removeId3v2Tag() -
hasCustomTag
public boolean hasCustomTag() -
getCustomTag
public byte[] getCustomTag() -
setCustomTag
public void setCustomTag(byte[] customTag) -
removeCustomTag
public void removeCustomTag() -
save
- Throws:
IOException
NotSupportedException
-