gnu.io
クラス LPRPort

java.lang.Object
  上位を拡張 gnu.io.CommPort
      上位を拡張 gnu.io.ParallelPort
          上位を拡張 gnu.io.LPRPort

final class LPRPort
extends ParallelPort

LPRPort


入れ子のクラスの概要
(package private)  class LPRPort.MonitorThread
           
(package private)  class LPRPort.ParallelInputStream
          Inner class for ParallelInputStream
(package private)  class LPRPort.ParallelOutputStream
          Inner class for ParallelOutputStream
 
フィールドの概要
private static boolean debug
           
private  int fd
          File descriptor
private  LPRPort.ParallelInputStream in
          Input stream
private  int lprmode
          return current mode LPT_MODE_SPP, LPT_MODE_PS2, LPT_MODE_EPP, or LPT_MODE_ECP
private  LPRPort.MonitorThread monThread
          Thread to monitor data
private  LPRPort.ParallelOutputStream out
          Output stream
private  ParallelPortEventListener PPEventListener
          Parallel Port Event listener
private  int threshold
          Receive threshold control
private  int timeout
          Receive timeout control
 
クラス gnu.io.ParallelPort から継承されたフィールド
LPT_MODE_ANY, LPT_MODE_ECP, LPT_MODE_EPP, LPT_MODE_NIBBLE, LPT_MODE_PS2, LPT_MODE_SPP
 
クラス gnu.io.CommPort から継承されたフィールド
name
 
コンストラクタの概要
LPRPort(java.lang.String name)
          Open the named port
 
メソッドの概要
 void addEventListener(ParallelPortEventListener lsnr)
          Add an event listener
 boolean checkMonitorThread()
           
 void close()
           
 void disableReceiveFraming()
           
 void disableReceiveThreshold()
           
 void disableReceiveTimeout()
           
protected  void drain()
           
 void enableReceiveFraming(int f)
          Receive framing control
 void enableReceiveThreshold(int t)
           
 void enableReceiveTimeout(int t)
           
(package private)  void eventLoop()
          Process ParallelPortEvents
protected  void finalize()
          Finalize the port
 int getInputBufferSize()
           
 java.io.InputStream getInputStream()
           
 int getMode()
           
 int getOutputBufferFree()
           
 int getOutputBufferSize()
           
 java.io.OutputStream getOutputStream()
           
 int getReceiveFramingByte()
           
 int getReceiveThreshold()
           
 int getReceiveTimeout()
           
private static void Initialize()
          Initialize the native library
 boolean isPaperOut()
           
 boolean isPrinterBusy()
           
 boolean isPrinterError()
           
 boolean isPrinterSelected()
           
 boolean isPrinterTimedOut()
           
 boolean isReceiveFramingEnabled()
           
 boolean isReceiveThresholdEnabled()
           
 boolean isReceiveTimeoutEnabled()
           
protected  int nativeavailable()
          LPRPort read methods
private  void nativeClose()
          Close the port
 void notifyOnBuffer(boolean enable)
           
 void notifyOnError(boolean enable)
          Note: these have to be separate boolean flags because the ParallelPortEvent constants are NOT bit-flags, they are just defined as integers from 1 to 10 -DPL
private  int open(java.lang.String name)
           
protected  int readArray(byte[] b, int off, int len)
           
protected  int readByte()
           
 void removeEventListener()
          Remove the parallel port event listener
 void restart()
           
 boolean sendEvent(int event, boolean state)
           
 void setInputBufferSize(int size)
          Input/output buffers These are native stubs...
 boolean setLPRMode(int mode)
           
 int setMode(int mode)
           
 void setOutputBufferSize(int size)
           
 void suspend()
           
protected  void writeArray(byte[] b, int off, int len)
           
protected  void writeByte(int b)
          Write to the port
 
クラス gnu.io.CommPort から継承されたメソッド
getName, toString
 
クラス java.lang.Object から継承されたメソッド
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

フィールドの詳細

debug

private static final boolean debug
関連項目:
定数フィールド値

fd

private int fd
File descriptor


out

private final LPRPort.ParallelOutputStream out
Output stream


in

private final LPRPort.ParallelInputStream in
Input stream


lprmode

private int lprmode
return current mode LPT_MODE_SPP, LPT_MODE_PS2, LPT_MODE_EPP, or LPT_MODE_ECP


timeout

private int timeout
Receive timeout control


threshold

private int threshold
Receive threshold control


PPEventListener

private ParallelPortEventListener PPEventListener
Parallel Port Event listener


monThread

private LPRPort.MonitorThread monThread
Thread to monitor data

コンストラクタの詳細

LPRPort

public LPRPort(java.lang.String name)
        throws PortInUseException
Open the named port

例外:
PortInUseException
メソッドの詳細

Initialize

private static void Initialize()
Initialize the native library


open

private int open(java.lang.String name)
          throws PortInUseException
例外:
PortInUseException

getOutputStream

public java.io.OutputStream getOutputStream()
定義:
クラス CommPort 内の getOutputStream

getInputStream

public java.io.InputStream getInputStream()
定義:
クラス CommPort 内の getInputStream

getMode

public int getMode()
定義:
クラス ParallelPort 内の getMode

setMode

public int setMode(int mode)
            throws UnsupportedCommOperationException
定義:
クラス ParallelPort 内の setMode
例外:
UnsupportedCommOperationException

restart

public void restart()
定義:
クラス ParallelPort 内の restart

suspend

public void suspend()
定義:
クラス ParallelPort 内の suspend

setLPRMode

public boolean setLPRMode(int mode)
                   throws UnsupportedCommOperationException
例外:
UnsupportedCommOperationException

isPaperOut

public boolean isPaperOut()
定義:
クラス ParallelPort 内の isPaperOut

isPrinterBusy

public boolean isPrinterBusy()
定義:
クラス ParallelPort 内の isPrinterBusy

isPrinterError

public boolean isPrinterError()
定義:
クラス ParallelPort 内の isPrinterError

isPrinterSelected

public boolean isPrinterSelected()
定義:
クラス ParallelPort 内の isPrinterSelected

isPrinterTimedOut

public boolean isPrinterTimedOut()
定義:
クラス ParallelPort 内の isPrinterTimedOut

nativeClose

private void nativeClose()
Close the port


close

public void close()
オーバーライド:
クラス CommPort 内の close

enableReceiveFraming

public void enableReceiveFraming(int f)
                          throws UnsupportedCommOperationException
Receive framing control

定義:
クラス CommPort 内の enableReceiveFraming
例外:
UnsupportedCommOperationException

disableReceiveFraming

public void disableReceiveFraming()
定義:
クラス CommPort 内の disableReceiveFraming

isReceiveFramingEnabled

public boolean isReceiveFramingEnabled()
定義:
クラス CommPort 内の isReceiveFramingEnabled

getReceiveFramingByte

public int getReceiveFramingByte()
定義:
クラス CommPort 内の getReceiveFramingByte

enableReceiveTimeout

public void enableReceiveTimeout(int t)
定義:
クラス CommPort 内の enableReceiveTimeout

disableReceiveTimeout

public void disableReceiveTimeout()
定義:
クラス CommPort 内の disableReceiveTimeout

isReceiveTimeoutEnabled

public boolean isReceiveTimeoutEnabled()
定義:
クラス CommPort 内の isReceiveTimeoutEnabled

getReceiveTimeout

public int getReceiveTimeout()
定義:
クラス CommPort 内の getReceiveTimeout

enableReceiveThreshold

public void enableReceiveThreshold(int t)
定義:
クラス CommPort 内の enableReceiveThreshold

disableReceiveThreshold

public void disableReceiveThreshold()
定義:
クラス CommPort 内の disableReceiveThreshold

getReceiveThreshold

public int getReceiveThreshold()
定義:
クラス CommPort 内の getReceiveThreshold

isReceiveThresholdEnabled

public boolean isReceiveThresholdEnabled()
定義:
クラス CommPort 内の isReceiveThresholdEnabled

setInputBufferSize

public void setInputBufferSize(int size)
Input/output buffers These are native stubs...

定義:
クラス CommPort 内の setInputBufferSize

getInputBufferSize

public int getInputBufferSize()
定義:
クラス CommPort 内の getInputBufferSize

setOutputBufferSize

public void setOutputBufferSize(int size)
定義:
クラス CommPort 内の setOutputBufferSize

getOutputBufferSize

public int getOutputBufferSize()
定義:
クラス CommPort 内の getOutputBufferSize

getOutputBufferFree

public int getOutputBufferFree()
定義:
クラス ParallelPort 内の getOutputBufferFree

writeByte

protected void writeByte(int b)
                  throws java.io.IOException
Write to the port

例外:
java.io.IOException

writeArray

protected void writeArray(byte[] b,
                          int off,
                          int len)
                   throws java.io.IOException
例外:
java.io.IOException

drain

protected void drain()
              throws java.io.IOException
例外:
java.io.IOException

nativeavailable

protected int nativeavailable()
                       throws java.io.IOException
LPRPort read methods

例外:
java.io.IOException

readByte

protected int readByte()
                throws java.io.IOException
例外:
java.io.IOException

readArray

protected int readArray(byte[] b,
                        int off,
                        int len)
                 throws java.io.IOException
例外:
java.io.IOException

eventLoop

void eventLoop()
Process ParallelPortEvents


checkMonitorThread

public boolean checkMonitorThread()

sendEvent

public boolean sendEvent(int event,
                         boolean state)

addEventListener

public void addEventListener(ParallelPortEventListener lsnr)
                      throws java.util.TooManyListenersException
Add an event listener

定義:
クラス ParallelPort 内の addEventListener
例外:
java.util.TooManyListenersException

removeEventListener

public void removeEventListener()
Remove the parallel port event listener

定義:
クラス ParallelPort 内の removeEventListener

notifyOnError

public void notifyOnError(boolean enable)
Note: these have to be separate boolean flags because the ParallelPortEvent constants are NOT bit-flags, they are just defined as integers from 1 to 10 -DPL

定義:
クラス ParallelPort 内の notifyOnError

notifyOnBuffer

public void notifyOnBuffer(boolean enable)
定義:
クラス ParallelPort 内の notifyOnBuffer

finalize

protected void finalize()
Finalize the port

オーバーライド:
クラス java.lang.Object 内の finalize