|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xnap.plugin.viewer.vorbisviewer.VorbisInfo
public class VorbisInfo
A utility for reading information and comments from the header packets of an Ogg Vorbis stream.
Copyright (C) 2001 Matthew Elder
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
Constructor Summary | |
---|---|
VorbisInfo(java.io.InputStream s)
Initializes Ogg Vorbis information based on the header from a stream. |
Method Summary | |
---|---|
long |
getBitrate()
Returns the average bitrate of the stream in kbps. |
int |
getChannels()
Returns the number of channels in the bitstream. |
java.util.Vector |
getComments(java.lang.String field)
Returns a Vector containing values from the comment header. |
java.util.Set |
getFields()
Returns a Set of comment field names in no particular order. |
long |
getRate()
Returns the rate of the stream in Hz. |
java.lang.String |
toString()
Prints out the information from an Ogg Vorbis stream in a nice, humanly-readable format. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public VorbisInfo(java.io.InputStream s) throws java.io.IOException
s
- an Ogg Vorbis data stream
java.io.IOException
Method Detail |
---|
public int getChannels()
public long getRate()
public long getBitrate()
public java.util.Vector getComments(java.lang.String field)
Vector
containing values from the comment header.
Vorbis comments take the form:
FIELD=SOME STRING VALUE.Since there is no requirement for FIELD to be unique there may be multiple values for one field.
getComments
returns a Vector
of
String
for all of the strings associated with
a field.
field
is case insensitive.
field
- a case insensitive string for a field name in an Ogg Vorbis
comment header
public java.util.Set getFields()
Set
of comment field names in no particular order.
Set
of comment field names in no particular order.public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |