⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 javax.comm.parallelport.html

📁 java串口通讯api
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Sun Nov 15 16:06:15 PST 1998 -->
<title>
  Class javax.comm.ParallelPort
</title>
</head>
<body>
<a name="_top_"></a>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-javax.comm.html">This Package</a>  <a href="javax.comm.CommPortIdentifier.html#_top_">Previous</a>  <a href="javax.comm.ParallelPortEvent.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class javax.comm.ParallelPort
</h1>
<pre>
java.lang.Object
   |
   +----<a href="javax.comm.CommPort.html#_top_">javax.comm.CommPort</a>
           |
           +----javax.comm.ParallelPort
</pre>
<hr>
<dl>
  <dt> public abstract class <b>ParallelPort</b>
  <dt> extends <a href="javax.comm.CommPort.html#_top_">CommPort</a>
</dl>
A parallel communications port. <CODE>ParallelPort</CODE> describes the low-level interface to a parallel communications port made available by the underlying system. <CODE>ParallelPort</CODE> defines the minimum required functionality for parallel communications ports.
<p>
<dl>
    <dt> <b>See Also:</b>
    <dd> <a href="javax.comm.CommPort.html#_top_">CommPort</a>, <a href="javax.comm.CommPortIdentifier.html#_top_">CommPortIdentifier</a>
</dl>
<hr>
<a name="index"></a>
<h2>
  <img src="images/variable-index.gif" width=207 height=38 alt="Variable Index">
</h2>
<dl>
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#LPT_MODE_ANY"><b>LPT_MODE_ANY</b></a>
  <dd>  Picks the best available mode.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#LPT_MODE_ECP"><b>LPT_MODE_ECP</b></a>
  <dd>  Enhanced capabilities port.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#LPT_MODE_EPP"><b>LPT_MODE_EPP</b></a>
  <dd>  Extended parallel port.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#LPT_MODE_NIBBLE"><b>LPT_MODE_NIBBLE</b></a>
  <dd>  Nibble Mode.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#LPT_MODE_PS2"><b>LPT_MODE_PS2</b></a>
  <dd>  Byte mode.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#LPT_MODE_SPP"><b>LPT_MODE_SPP</b></a>
  <dd>  Compatibility mode.
</dl>
<h2>
  <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
</h2>
<dl>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#ParallelPort()"><b>ParallelPort</b></a>()
  <dd> 
</dl>
<h2>
  <img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#addEventListener(javax.comm.ParallelPortEventListener)"><b>addEventListener</b></a>(ParallelPortEventListener)
  <dd>  Registers a <CODE>ParallelPortEventListener</CODE> object for <CODE>ParallelPortEvent</CODE>s.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getMode()"><b>getMode</b></a>()
  <dd>  Gets the currently configured mode.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getOutputBufferFree()"><b>getOutputBufferFree</b></a>()
  <dd>  Gets the number of bytes available in the output buffer.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#isPaperOut()"><b>isPaperOut</b></a>()
  <dd>  Checks if the port is indicating an "Out of Paper" state.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#isPrinterBusy()"><b>isPrinterBusy</b></a>()
  <dd>  Checks if the port is indicating a "Printer Busy" state.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#isPrinterError()"><b>isPrinterError</b></a>()
  <dd>  Checks if the printer has encountered an error.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#isPrinterSelected()"><b>isPrinterSelected</b></a>()
  <dd>  Checks if the printer is in selected state.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#isPrinterTimedOut()"><b>isPrinterTimedOut</b></a>()
  <dd>  Checks if the printer has timed out.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#notifyOnBuffer(boolean)"><b>notifyOnBuffer</b></a>(boolean)
  <dd>  Expresses interest in being notified when the output buffer is empty.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#notifyOnError(boolean)"><b>notifyOnError</b></a>(boolean)
  <dd>  Expresses interest in being notified of port errors.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#removeEventListener()"><b>removeEventListener</b></a>()
  <dd>  Deregisters event listener registered using <CODE>addEventListener</CODE>.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#restart()"><b>restart</b></a>()
  <dd>  Restarts output after an error.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setMode(int)"><b>setMode</b></a>(int)
  <dd>  Sets the printer port mode.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#suspend()"><b>suspend</b></a>()
  <dd>  Suspends output.
</dl>
<a name="variables"></a>
<h2>
  <img src="images/variables.gif" width=153 height=38 alt="Variables">
</h2>
<a name="LPT_MODE_ANY"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>LPT_MODE_ANY</b>
<pre>
 public static final int LPT_MODE_ANY
</pre>
<dl>
  <dd> Picks the best available mode.<p>
</dl>
<a name="LPT_MODE_SPP"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>LPT_MODE_SPP</b>
<pre>
 public static final int LPT_MODE_SPP
</pre>
<dl>
  <dd> Compatibility mode. Unidirectional.<p>
</dl>
<a name="LPT_MODE_PS2"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>LPT_MODE_PS2</b>
<pre>
 public static final int LPT_MODE_PS2
</pre>
<dl>
  <dd> Byte mode. Bi-directional.<p>
</dl>
<a name="LPT_MODE_EPP"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>LPT_MODE_EPP</b>
<pre>
 public static final int LPT_MODE_EPP
</pre>
<dl>
  <dd> Extended parallel port.<p>
</dl>
<a name="LPT_MODE_ECP"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>LPT_MODE_ECP</b>
<pre>
 public static final int LPT_MODE_ECP
</pre>
<dl>
  <dd> Enhanced capabilities port.<p>
</dl>
<a name="LPT_MODE_NIBBLE"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>LPT_MODE_NIBBLE</b>
<pre>
 public static final int LPT_MODE_NIBBLE
</pre>
<dl>
  <dd> Nibble Mode. Bi-directional. HP Bi-tronics. 4 bits at a time.<p>
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="ParallelPort"></a>
<a name="ParallelPort()"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>ParallelPort</b>
<pre>
 public ParallelPort()
</pre>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="addEventListener(javax.comm.ParallelPortEventListener)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="addEventListener"><b>addEventListener</b></a>
<pre>
 public abstract void addEventListener(<a href="javax.comm.ParallelPortEventListener.html#_top_">ParallelPortEventListener</a> lsnr) throws TooManyListenersException
</pre>
<dl>
  <dd> Registers a <CODE>ParallelPortEventListener</CODE> object for <CODE>ParallelPortEvent</CODE>s. Interest in specific events may be expressed by using the <CODE>notifyOnError</CODE> and <CODE>notifyOnBuffer</CODE> methods. <P> Only one listener per <CODE>ParallelPort</CODE> is supported. Calling <CODE>addEventListener</CODE> multiple times will simply replace the current <CODE>ParallelPortEventListener</CODE> object. <P> After the port is closed, no more event will be generated. Another  call to <CODE>open()</CODE> of the port's  <CODE>CommPortIdentifier</CODE>  object will return a new <CODE>CommPort</CODE> object, and the lsnr  has to be added again to the new <CODE>CommPort</CODE> object to  receive event from this port. <P>
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> lsnr - A <CODE>ParallelPortEventListener</CODE> object                  whose <CODE>parallelEvent</CODE> method will be called                  to indicate an event. <P>
    <dt> <b>Throws:</b> TooManyListenersException
    <dd> If an initial attempt to                  attach a listener succeeds, subsequent                  attempts will throw TooManyListenersException                   without effecting the first listener.
  </dl></dd>
</dl>
<a name="removeEventListener()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="removeEventListener"><b>removeEventListener</b></a>
<pre>
 public abstract void removeEventListener()
</pre>
<dl>
  <dd> Deregisters event listener registered using <CODE>addEventListener</CODE>. This is done automatically when a port is closed.
<p>
</dl>
<a name="notifyOnError(boolean)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="notifyOnError"><b>notifyOnError</b></a>
<pre>
 public abstract void notifyOnError(boolean notify)
</pre>
<dl>
  <dd> Expresses interest in being notified of port errors.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> notify - enable or disable error notification based on whether			notify is true or false
  </dl></dd>
</dl>
<a name="notifyOnBuffer(boolean)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="notifyOnBuffer"><b>notifyOnBuffer</b></a>
<pre>
 public abstract void notifyOnBuffer(boolean notify)
</pre>
<dl>
  <dd> Expresses interest in being notified when the output buffer is empty.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> boolean - <CODE>true</CODE> enables notification;                  <CODE>false</CODE> disables notification.
  </dl></dd>
</dl>
<a name="getOutputBufferFree()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getOutputBufferFree"><b>getOutputBufferFree</b></a>
<pre>
 public abstract int getOutputBufferFree()
</pre>
<dl>
  <dd> Gets the number of bytes available in the output buffer.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> integer value corresponding to the number of bytes available      in the output buffer
  </dl></dd>
</dl>
<a name="isPaperOut()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="isPaperOut"><b>isPaperOut</b></a>
<pre>
 public abstract boolean isPaperOut()
</pre>
<dl>
  <dd> Checks if the port is indicating an "Out of Paper" state.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> true if printer has run out of paper,		false if printer does not report "Out of paper".
  </dl></dd>
</dl>
<a name="isPrinterBusy()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="isPrinterBusy"><b>isPrinterBusy</b></a>
<pre>
 public abstract boolean isPrinterBusy()
</pre>
<dl>
  <dd> Checks if the port is indicating a "Printer Busy" state.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> true if printer is busy,		false if printer is idle
  </dl></dd>
</dl>
<a name="isPrinterSelected()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="isPrinterSelected"><b>isPrinterSelected</b></a>
<pre>
 public abstract boolean isPrinterSelected()
</pre>
<dl>
  <dd> Checks if the printer is in selected state.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> true if printer is selected,		false if printer is in deselected mode
  </dl></dd>
</dl>
<a name="isPrinterTimedOut()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="isPrinterTimedOut"><b>isPrinterTimedOut</b></a>
<pre>
 public abstract boolean isPrinterTimedOut()
</pre>
<dl>
  <dd> Checks if the printer has timed out.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> true if printer has timed out,		false if printer does not report "Out of paper".
  </dl></dd>
</dl>
<a name="isPrinterError()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="isPrinterError"><b>isPrinterError</b></a>
<pre>
 public abstract boolean isPrinterError()
</pre>
<dl>
  <dd> Checks if the printer has encountered an error.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> true if printer has encountered an error,		false if printer does not report "Out of paper".
  </dl></dd>
</dl>
<a name="restart()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="restart"><b>restart</b></a>
<pre>
 public abstract void restart()
</pre>
<dl>
  <dd> Restarts output after an error.
<p>
</dl>
<a name="suspend()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="suspend"><b>suspend</b></a>
<pre>
 public abstract void suspend()
</pre>
<dl>
  <dd> Suspends output.
<p>
</dl>
<a name="getMode()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getMode"><b>getMode</b></a>
<pre>
 public abstract int getMode()
</pre>
<dl>
  <dd> Gets the currently configured mode.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> mode returned is one of LPT_MODE_SPP,		LPT_MODE_PS2, LPT_MODE_EPP, or LPT_MODE_ECP
  </dl></dd>
</dl>
<a name="setMode(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setMode"><b>setMode</b></a>
<pre>
 public abstract int setMode(int mode) throws <a href="javax.comm.UnsupportedCommOperationException.html#_top_">UnsupportedCommOperationException</a>
</pre>
<dl>
  <dd> Sets the printer port mode.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> mode - one of LPT_MODE_ANY, LPT_MODE_SPP,			LPT_MODE_PS2, LPT_MODE_EPP, or LPT_MODE_ECP<P>
    <dt> <b>Throws:</b> <a href="javax.comm.UnsupportedCommOperationException.html#_top_">UnsupportedCommOperationException</a>
    <dd> is thrown if the			mode is not supported by the underline driver.
  </dl></dd>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-javax.comm.html">This Package</a>  <a href="javax.comm.CommPortIdentifier.html#_top_">Previous</a>  <a href="javax.comm.ParallelPortEvent.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -