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 intbufferLength -
Constructor Summary
Constructors Modifier Constructor Description protectedMp3File()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 intgetBitrate()Map<Integer,MutableInteger>getBitrates()StringgetChannelMode()byte[]getCustomTag()StringgetEmphasis()intgetEndOffset()intgetFrameCount()ID3v1getId3v1Tag()ID3v2getId3v2Tag()StringgetLayer()longgetLengthInMilliseconds()longgetLengthInSeconds()StringgetModeExtension()intgetSampleRate()intgetStartOffset()StringgetVersion()intgetXingBitrate()intgetXingOffset()booleanhasCustomTag()booleanhasId3v1Tag()booleanhasId3v2Tag()booleanhasXingFrame()booleanisCopyright()booleanisOriginal()booleanisVbr()protected intpreScanFile(SeekableByteChannel seekableByteChannel)voidremoveCustomTag()voidremoveId3v1Tag()voidremoveId3v2Tag()voidsave(String newFilename)voidsetCustomTag(byte[] customTag)voidsetId3v1Tag(ID3v1 id3v1Tag)voidsetId3v2Tag(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:
IOExceptionNotSupportedException
-