📄 manager.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Fri Sep 27 14:47:31 CDT 2002 --><TITLE>Mobile Information Device Profile 2.0: Class Manager</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Manager.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><strong>MIDP 2.0</strong></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> PREV CLASS NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="Manager.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">javax.microedition.media</FONT><BR>Class Manager</H2><PRE>java.lang.Object | +--<B>javax.microedition.media.Manager</B></PRE><HR><DL><DT>public final class <B>Manager</B><DT>extends Object</DL><P><code>Manager</code> is the access point for obtaining system dependent resources such as <code>Players</code> for multimedia processing. <p> A <a href="Player.html"<code>Player</code></a> is an object used to control and render media that is specific to the <a href="#content-type">content type</a> of the data. <p> <code>Manager</code> provides access to an implementation specific mechanism for constructing <code>Players</code>. <p> For convenience, <code>Manager</code> also provides a simplified method to generate simple tones. <h2>Simple Tone Generation</h2> <blockquote> The <a href="#playTone(int, int, int)"> <code>playTone</code></a> function is defined to generate tones. Given the note and duration, the function will produce the specified tone. </blockquote> <h2>Creating Players</h2> <blockquote> <code>Manager</code> provides two methods to create a <code>Player</code> for playing back media: <ul> <li> Create from a media locator. <li> Create from an <code>InputStream</code>. </ul> The <code>Player</code> returned can be used to control the presentation of the media. </blockquote> <p> <a name="content-type"></a> <h2>Content Types</h2> <blockquote> Content types identify the type of media data. They are defined to be the registered MIME types (<a href= "http://www.iana.org/assignments/media-types/"> http://www.iana.org/assignments/media-types/</a>); plus some user-defined types that generally follow the MIME syntax (<a href="ftp://ftp.isi.edu/in-notes/rfc2045.txt">RFC 2045</a>, <a href="ftp://ftp.isi.edu/in-notes/rfc2046.txt">RFC 2046</a>). <p> For example, here are a few common content types: <ol> <li>Wave audio files: <code>audio/x-wav</code> <li>AU audio files: <code>audio/basic</code> <li>MP3 audio files: <code>audio/mpeg</code> <li>MIDI files: <code>audio/midi</code> <li>Tone sequences: <code>audio/x-tone-seq</code> </ol> </blockquote> <a name="media-locator"></a> <h2>Media Locator</h2> <blockquote> <a name="media-protocol"></a> Media locators are specified in <a href="http://www.ietf.org/rfc/rfc2396.txt">URI syntax</a> which is defined in the form: <p> <scheme>:<scheme-specific-part> <p> The "scheme" part of the locator string identifies the name of the protocol being used to deliver the data. </blockquote><P><DL><DT><B>See Also: </B><DD><A HREF="../../../javax/microedition/media/Player.html"><CODE>Player</CODE></A></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/media/Manager.html#TONE_DEVICE_LOCATOR">TONE_DEVICE_LOCATOR</A></B></CODE><BR> The locator to create a tone <code>Player</code> to play back tone sequences.</TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../javax/microedition/media/Player.html">Player</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/media/Manager.html#createPlayer(java.io.InputStream, java.lang.String)">createPlayer</A></B>(java.io.InputStream stream, String type)</CODE><BR> Create a <code>Player</code> to play back media from an <code>InputStream</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../javax/microedition/media/Player.html">Player</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/media/Manager.html#createPlayer(java.lang.String)">createPlayer</A></B>(String locator)</CODE><BR> Create a <code>Player</code> from an input locator.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static String[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/media/Manager.html#getSupportedContentTypes(java.lang.String)">getSupportedContentTypes</A></B>(String protocol)</CODE><BR> Return the list of supported content types for the given protocol.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static String[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/media/Manager.html#getSupportedProtocols(java.lang.String)">getSupportedProtocols</A></B>(String content_type)</CODE><BR> Return the list of supported protocols given the content type.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/media/Manager.html#playTone(int, int, int)">playTone</A></B>(int note, int duration, int volume)</CODE><BR> Play back a tone as specified by a note and its duration.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.Object</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD></TR></TABLE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -