|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tffenterprises.music.tag.id3v2.Flags
com.tffenterprises.music.tag.id3v2.Flags_2_0
class Flags_2_0
Flags_2_0 implements the flags for version 2.0 of ID3v2 (aka ID3v2.2.0). This class also works for experimental tags of version 2.1.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.tffenterprises.music.tag.id3v2.Flags |
---|
Flags.InputProcessingStream |
Field Summary | |
---|---|
static byte |
TAG_COMPRESSION_FLAG
Flag bit for extended header presence. |
Fields inherited from class com.tffenterprises.music.tag.id3v2.Flags |
---|
DEFAULT, EXPERIMENTAL_FLAG, UNSYNCHRONIZATION_FLAG |
Constructor Summary | |
---|---|
protected |
Flags_2_0()
Default constructor. |
protected |
Flags_2_0(byte flags)
Constructs a Flags_2_0 object with the given flags. |
Method Summary | |
---|---|
void |
checkVersion()
Asserts that the object's assigned version number is compatible. |
boolean |
isIncompatible()
Returns whether the tag has the incompatible (tag compression) flag turned on. |
java.io.InputStream |
processInput(java.io.InputStream in)
Processes the InputStream in which the ID3v2
information is embedded, and return an InputStream
that will correctly read the tag given the flags. |
java.io.OutputStream |
processOutput(java.io.OutputStream out)
Process the OutputStream in which the ID3v2 tag is to be embedded. |
boolean |
usesTagCompression()
Returns whether these flags indicate the use of tag compression. |
Methods inherited from class com.tffenterprises.music.tag.id3v2.Flags |
---|
check, clone, equals, getChecksum, getFlags, getNewInstance, getNewInstance, getNewInstance, getVersion, hashCode, isChanged, isMarkedExperimental, processUnsynchronization, set, setChanged, setFlags, toString, unset, updateChecksum, usesUnsynchronization |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final byte TAG_COMPRESSION_FLAG
Constructor Detail |
---|
protected Flags_2_0()
protected Flags_2_0(byte flags)
flags
- the flags used to initialize the object.Method Detail |
---|
public boolean usesTagCompression()
public boolean isIncompatible()
public void checkVersion() throws TagDataFormatException
checkVersion
in class Flags
TagDataFormatException
- if the version is not compatible.public java.io.InputStream processInput(java.io.InputStream in) throws java.io.IOException, TagDataFormatException
InputStream
in which the ID3v2
information is embedded, and return an InputStream
that will correctly read the tag given the flags. If the tag
reports that it uses compression, throw an exception.
processInput
in class Flags
in
- the InputStream in which the ID3v2 information is embedded.
InputStream
which will correctly process the tag..
TagDataFormatException
- if the stream contains a malformed or
otherwise incompatible tag,
or some erroneous parameters.
java.io.IOException
- if an I/O error occurs.public java.io.OutputStream processOutput(java.io.OutputStream out)
ID3v2
when
writing the tag to a file or stream.
This method applies a FilterOutputStream
which
processes any necessary unsynchronization for the tag, and makes
sure the compression flag is not set.
processOutput
in class Flags
out
- the OutputStream to which the ID3v2 tag will be written
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |