public abstract class MetadataParserImpl extends Thread implements MetadataParser
Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
protected ByteBuffer |
rawMetaBlob |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
ALBUM_TAG_NAME, ALBUMARTIST_TAG_NAME, ARTIST_TAG_NAME, AUDIOCODEC_TAG_NAME, COMMENT_TAG_NAME, COMPOSER_TAG_NAME, CREATIONDATE_TAG_NAME, DISCCOUNT_TAG_NAME, DISCNUMBER_TAG_NAME, DURATION_TAG_NAME, FRAMERATE_TAG_NAME, GENRE_TAG_NAME, HEIGHT_TAG_NAME, IMAGE_TAG_NAME, RAW_FLV_METADATA_NAME, RAW_ID3_METADATA_NAME, RAW_METADATA_TAG_NAME, TEXT_TAG_NAME, TITLE_TAG_NAME, TRACKCOUNT_TAG_NAME, TRACKNUMBER_TAG_NAME, VIDEOCODEC_TAG_NAME, WIDTH_TAG_NAME, YEAR_TAG_NAME
Constructor and Description |
---|
MetadataParserImpl(Locator locator) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(MetadataListener listener) |
protected void |
addMetadataItem(String tag,
Object value) |
protected void |
addRawMetadata(String type) |
protected Object |
convertValue(String tag,
Object value) |
protected void |
disposeRawMetadata() |
protected void |
done() |
protected byte[] |
getBytes(int size) |
protected double |
getDouble() |
protected int |
getInteger() |
protected long |
getLong() |
protected byte |
getNextByte() |
protected short |
getShort() |
protected int |
getStreamPosition() |
protected String |
getString(int length,
Charset charset) |
protected int |
getU24() |
protected abstract void |
parse() |
protected void |
readRawMetadata(int size) |
void |
removeListener(MetadataListener listener) |
void |
run() |
protected void |
setParseRawMetadata(boolean state) |
protected void |
skipBytes(int num) |
void |
startParser() |
protected void |
startRawMetadata(int sizeHint) |
void |
stopParser() |
protected void |
stuffRawMetadata(byte[] data,
int offset,
int size) |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
protected ByteBuffer rawMetaBlob
public MetadataParserImpl(Locator locator)
public void addListener(MetadataListener listener)
addListener
in interface MetadataParser
public void removeListener(MetadataListener listener)
removeListener
in interface MetadataParser
public void startParser() throws IOException
startParser
in interface MetadataParser
IOException
public void stopParser()
stopParser
in interface MetadataParser
protected abstract void parse()
protected void done()
protected int getStreamPosition()
protected void startRawMetadata(int sizeHint)
protected void readRawMetadata(int size) throws IOException
IOException
protected void stuffRawMetadata(byte[] data, int offset, int size)
protected void disposeRawMetadata()
protected void setParseRawMetadata(boolean state)
protected void addRawMetadata(String type)
protected void skipBytes(int num) throws IOException, EOFException
IOException
EOFException
protected byte getNextByte() throws IOException, EOFException
IOException
EOFException
protected byte[] getBytes(int size) throws IOException, EOFException
IOException
EOFException
protected long getLong() throws IOException, EOFException
IOException
EOFException
protected int getInteger() throws IOException, EOFException
IOException
EOFException
protected short getShort() throws IOException, EOFException
IOException
EOFException
protected double getDouble() throws IOException, EOFException
IOException
EOFException
protected String getString(int length, Charset charset) throws IOException, EOFException
IOException
EOFException
protected int getU24() throws IOException, EOFException
IOException
EOFException
Copyright © 2020. All rights reserved.