📄 java.telephony.media.mediaterminalconnection.html
字号:
<a name="getMediaState"><b>getMediaState</b></a><pre> public abstract int getMediaState() throws <a href="java.telephony.PlatformException.html#_top_">PlatformException</a></pre><dl> <dd> Returns the current state of the terminal connection as a bit maskof PLAYING and RECORDING.<p> <dl> <dt> <b>Returns:</b> <dd> The current state of playing or recording. <dt> <b>Throws:</b> <a href="java.telephony.PlatformException.html#_top_">PlatformException</a> <dd> A platform-specific exception occurred. </dl></dl><a name="useDefaultSpeaker()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="useDefaultSpeaker"><b>useDefaultSpeaker</b></a><pre> public abstract void useDefaultSpeaker() throws <a href="java.telephony.PrivilegeViolationException.html#_top_">PrivilegeViolationException</a>, <a href="java.telephony.ResourceUnavailableException.html#_top_">ResourceUnavailableException</a>, <a href="java.telephony.PlatformException.html#_top_">PlatformException</a></pre><dl> <dd> Instructs the terminal connection to use the default speaker forrecording from the telephone line.<p> <dl> <dt> <b>Throws:</b> <a href="java.telephony.PrivilegeViolationException.html#_top_">PrivilegeViolationException</a> <dd> Indicates the application isnot permitted to direct voice media to the default speaker. <dt> <b>Throws:</b> <a href="java.telephony.ResourceUnavailableException.html#_top_">ResourceUnavailableException</a> <dd> Indicates that the speaker isnot currently available for use. <dt> <b>Throws:</b> <a href="java.telephony.PlatformException.html#_top_">PlatformException</a> <dd> A platform-specific exception occurred. </dl></dl><a name="useRecordURL(java.net.URL)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="useRecordURL"><b>useRecordURL</b></a><pre> public abstract void useRecordURL(<a href="java.net.URL.html#_top_">URL</a> url) throws <a href="java.telephony.PrivilegeViolationException.html#_top_">PrivilegeViolationException</a>, <a href="java.telephony.ResourceUnavailableException.html#_top_">ResourceUnavailableException</a>, <a href="java.telephony.PlatformException.html#_top_">PlatformException</a></pre><dl> <dd> Instructs the terminal connection to use a file for recording fromthe telephone line.<p> <dl> <dt> <b>Parameters:</b> <dd> url - The URL-destination for the voice data for recording. <dt> <b>Throws:</b> <a href="java.telephony.PrivilegeViolationException.html#_top_">PrivilegeViolationException</a> <dd> Indicates the application is notpermitted to use the give URL for recording. <dt> <b>Throws:</b> <a href="java.telephony.ResourceUnavailableException.html#_top_">ResourceUnavailableException</a> <dd> Indicates the URL given is notavailable, either because the URL was invalid or a network problemoccurred. <dt> <b>Throws:</b> <a href="java.telephony.PlatformException.html#_top_">PlatformException</a> <dd> A platform-specific exception occurred. </dl></dl><a name="useDefaultMicrophone()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="useDefaultMicrophone"><b>useDefaultMicrophone</b></a><pre> public abstract void useDefaultMicrophone() throws <a href="java.telephony.PrivilegeViolationException.html#_top_">PrivilegeViolationException</a>, <a href="java.telephony.ResourceUnavailableException.html#_top_">ResourceUnavailableException</a>, <a href="java.telephony.PlatformException.html#_top_">PlatformException</a></pre><dl> <dd> Instructs the terminal connection to use the default microphone forplaying to the telephone line.<p> <dl> <dt> <b>Throws:</b> <a href="java.telephony.PrivilegeViolationException.html#_top_">PrivilegeViolationException</a> <dd> Indicates the application isnot permitted to direct voice media from the default microphone. <dt> <b>Throws:</b> <a href="java.telephony.ResourceUnavailableException.html#_top_">ResourceUnavailableException</a> <dd> Indicates that the microphone isnot currently available for use. <dt> <b>Throws:</b> <a href="java.telephony.PlatformException.html#_top_">PlatformException</a> <dd> A platform-specific exception occurred. </dl></dl><a name="usePlayURL(java.net.URL)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="usePlayURL"><b>usePlayURL</b></a><pre> public abstract void usePlayURL(<a href="java.net.URL.html#_top_">URL</a> url) throws <a href="java.telephony.PrivilegeViolationException.html#_top_">PrivilegeViolationException</a>, <a href="java.telephony.ResourceUnavailableException.html#_top_">ResourceUnavailableException</a>, <a href="java.telephony.PlatformException.html#_top_">PlatformException</a></pre><dl> <dd> Instructs the terminal connection to use a file for playing tothe telephone line.<p> <dl> <dt> <b>Parameters:</b> <dd> url - The URL-source of the voice data to play.valid or available source of voice data. <dt> <b>Throws:</b> <a href="java.telephony.PrivilegeViolationException.html#_top_">PrivilegeViolationException</a> <dd> Indicates the application is notpermitted to use the give URL for playing. <dt> <b>Throws:</b> <a href="java.telephony.ResourceUnavailableException.html#_top_">ResourceUnavailableException</a> <dd> Indicates the URL given is notavailable, either because the URL was invalid or a network problemoccurred. <dt> <b>Throws:</b> <a href="java.telephony.PlatformException.html#_top_">PlatformException</a> <dd> A platform-specific exception occurred. </dl></dl><a name="startPlaying()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="startPlaying"><b>startPlaying</b></a><pre> public abstract void startPlaying() throws <a href="java.telephony.MethodNotSupportedException.html#_top_">MethodNotSupportedException</a>, <a href="java.telephony.ResourceUnavailableException.html#_top_">ResourceUnavailableException</a>, <a href="java.telephony.InvalidStateException.html#_top_">InvalidStateException</a>, <a href="java.telephony.PlatformException.html#_top_">PlatformException</a></pre><dl> <dd> Start the playing. This method returns once playing has begun, that is,when getMediaState() & PLAYING == PLAYING.<p> <dl> <dt> <b>Throws:</b> <a href="java.telephony.MethodNotSupportedException.html#_top_">MethodNotSupportedException</a> <dd> The implementation does notsupport playing to the telephone line. <dt> <b>Throws:</b> <a href="java.telephony.ResourceUnavailableException.html#_top_">ResourceUnavailableException</a> <dd> Indicates playing is not ableto be started because some resource is unavailable. <dt> <b>Throws:</b> <a href="java.telephony.InvalidStateException.html#_top_">InvalidStateException</a> <dd> Indicates the TerminalConnection is notin the media channel available state. <dt> <b>Throws:</b> <a href="java.telephony.PlatformException.html#_top_">PlatformException</a> <dd> A platform-specific exception occurred. </dl></dl><a name="stopPlaying()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="stopPlaying"><b>stopPlaying</b></a><pre> public abstract void stopPlaying() throws <a href="java.telephony.PlatformException.html#_top_">PlatformException</a></pre><dl> <dd> Stop the playing. This method returns once the playing has stopped, thatis, when getMediaState() & PLAYING == 0. If playing is not currentlytaking place, this method has no effect.<p> <dl> <dt> <b>Throws:</b> <a href="java.telephony.PlatformException.html#_top_">PlatformException</a> <dd> A platform-specific exception occurred. </dl></dl><a name="startRecording()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="startRecording"><b>startRecording</b></a><pre> public abstract void startRecording() throws <a href="java.telephony.MethodNotSupportedException.html#_top_">MethodNotSupportedException</a>, <a href="java.telephony.ResourceUnavailableException.html#_top_">ResourceUnavailableException</a>, <a href="java.telephony.InvalidStateException.html#_top_">InvalidStateException</a>, <a href="java.telephony.PlatformException.html#_top_">PlatformException</a></pre><dl> <dd> Start the recording. This method returns once the recording has started,that is, when getMediaState() & RECORDING == RECORDING.<p> <dl> <dt> <b>Throws:</b> <a href="java.telephony.MethodNotSupportedException.html#_top_">MethodNotSupportedException</a> <dd> The implementation does notsupport recording from the telephone line. <dt> <b>Throws:</b> <a href="java.telephony.ResourceUnavailableException.html#_top_">ResourceUnavailableException</a> <dd> Indicates recording is not ableto be started because some resource is unavailable. <dt> <b>Throws:</b> <a href="java.telephony.InvalidStateException.html#_top_">InvalidStateException</a> <dd> Indicates the TerminalConnection is notin the media channel available state. <dt> <b>Throws:</b> <a href="java.telephony.PlatformException.html#_top_">PlatformException</a> <dd> A platform-specific exception occurred. </dl></dl><a name="stopRecording()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="stopRecording"><b>stopRecording</b></a><pre> public abstract void stopRecording() throws <a href="java.telephony.PlatformException.html#_top_">PlatformException</a></pre><dl> <dd> Stop the recording. This method returns once the recording has stopped,that is, when getMediaState() & RECORDING == 0. If recording is notcurrently taking place, this method has no effect.<p> <dl> <dt> <b>Throws:</b> <a href="java.telephony.PlatformException.html#_top_">PlatformException</a> <dd> A platform-specific exception occurred. </dl></dl><a name="setDtmfDetection(boolean)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="setDtmfDetection"><b>setDtmfDetection</b></a><pre> public abstract void setDtmfDetection(boolean enable) throws <a href="java.telephony.MethodNotSupportedException.html#_top_">MethodNotSupportedException</a>, <a href="java.telephony.ResourceUnavailableException.html#_top_">ResourceUnavailableException</a>, <a href="java.telephony.InvalidStateException.html#_top_">InvalidStateException</a>, <a href="java.telephony.PlatformException.html#_top_">PlatformException</a></pre><a name="generateDtmf(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="generateDtmf"><b>generateDtmf</b></a><pre> public abstract void generateDtmf(<a href="java.lang.String.html#_top_">String</a> digits) throws <a href="java.telephony.MethodNotSupportedException.html#_top_">MethodNotSupportedException</a>, <a href="java.telephony.ResourceUnavailableException.html#_top_">ResourceUnavailableException</a>, <a href="java.telephony.InvalidStateException.html#_top_">InvalidStateException</a>, <a href="java.telephony.PlatformException.html#_top_">PlatformException</a></pre><hr><pre><a href="packages.html">All Packages</a> <a href="tree.html">Class Hierarchy</a> <a href="Package-java.telephony.media.html">This Package</a> <a href="java.telephony.media.MediaCallObserver.html#_top_">Previous</a> <a href="Package-java.telephony.media.html">Next</a> <a href="AllNames.html">Index</a></pre></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -