Package org.apache.tika.parser.mp3
Class ID3v2Frame
- java.lang.Object
- 
- org.apache.tika.parser.mp3.ID3v2Frame
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description protected static classID3v2Frame.RawTagprotected classID3v2Frame.RawTagIteratorIterates over id3v2 raw tags.protected static classID3v2Frame.TextEncoding
 - 
Field SummaryFields Modifier and Type Field Description protected static ID3v2Frame.TextEncoding[]encodings
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MP3FramecreateFrameIfPresent(InputStream inp)Returns the next ID3v2 Frame in the file, or null if the next batch of data doesn't correspond to either an ID3v2 header.protected static intget7BitsInt(byte[] data, int offset)AKA a Synchsafe integer.protected static ID3Tags.ID3CommentgetComment(byte[] data, int offset, int length)Builds up the ID3 comment, by parsing and extracting the comment string parts from the given data.byte[]getData()byte[]getExtendedHeader()intgetFlags()protected static intgetInt(byte[] data)protected static intgetInt(byte[] data, int offset)protected static intgetInt2(byte[] data, int offset)protected static intgetInt3(byte[] data, int offset)intgetLength()intgetMajorVersion()static intgetMaxRecordSize()intgetMinorVersion()protected static StringgetString(byte[] data, int offset, int length)Returns the String at the given offset and length.protected static StringgetTagString(byte[] data, int offset, int length)Returns the (possibly null padded) String at the given offset and length.protected static byte[]readFully(InputStream inp, int length)protected static byte[]readFully(InputStream inp, int length, boolean shortDataIsFatal)static voidsetMaxRecordSize(int maxRecordSize)
 
- 
- 
- 
Field Detail- 
encodingsprotected static final ID3v2Frame.TextEncoding[] encodings 
 
- 
 - 
Method Detail- 
setMaxRecordSizepublic static void setMaxRecordSize(int maxRecordSize) 
 - 
createFrameIfPresentpublic static MP3Frame createFrameIfPresent(InputStream inp) throws IOException Returns the next ID3v2 Frame in the file, or null if the next batch of data doesn't correspond to either an ID3v2 header. If no ID3v2 frame could be detected and the passed in input stream is aPushbackInputStream, the bytes read so far are pushed back so that they can be read again. ID3v2 Frames should come before all Audio ones.- Throws:
- IOException
 
 - 
getIntprotected static int getInt(byte[] data) 
 - 
getIntprotected static int getInt(byte[] data, int offset)
 - 
getInt3protected static int getInt3(byte[] data, int offset)
 - 
getInt2protected static int getInt2(byte[] data, int offset)
 - 
get7BitsIntprotected static int get7BitsInt(byte[] data, int offset)AKA a Synchsafe integer. 4 bytes hold a 28 bit number. The highest bit in each byte is always 0 and always ignored.
 - 
readFullyprotected static byte[] readFully(InputStream inp, int length) throws IOException - Throws:
- IOException
 
 - 
readFullyprotected static byte[] readFully(InputStream inp, int length, boolean shortDataIsFatal) throws IOException - Throws:
- IOException
 
 - 
getTagStringprotected static String getTagString(byte[] data, int offset, int length) Returns the (possibly null padded) String at the given offset and length. String encoding is held in the first byte;
 - 
getCommentprotected static ID3Tags.ID3Comment getComment(byte[] data, int offset, int length) Builds up the ID3 comment, by parsing and extracting the comment string parts from the given data.
 - 
getStringprotected static String getString(byte[] data, int offset, int length) Returns the String at the given offset and length. Strings are ISO-8859-1
 - 
getMaxRecordSizepublic static int getMaxRecordSize() 
 - 
getMajorVersionpublic int getMajorVersion() 
 - 
getMinorVersionpublic int getMinorVersion() 
 - 
getFlagspublic int getFlags() 
 - 
getLengthpublic int getLength() 
 - 
getExtendedHeaderpublic byte[] getExtendedHeader() 
 - 
getDatapublic byte[] getData() 
 
- 
 
-