1.0.0

org.eclipse.soda.dk.tk.conn.echo
Class EchoJni

java.lang.Object
  extended by org.eclipse.soda.dk.tk.conn.echo.EchoJni

public class EchoJni
extends java.lang.Object

Version:
1.0.0

Constructor Summary
EchoJni()
          Constructs an instance of this class.
 
Method Summary
 void close()
           Close the echo.
protected  void ensureOpen()
          Ensure the echo is open.
protected  void finalize()
          Close the port when no more references remain.
 java.lang.String getPortName()
          Return the name of the echo.
 boolean isClosed()
          Return true if the echo is closed, false if open.
 void open(java.lang.String portName)
          Open the echo.
 int read(byte[] buffer, int offset, int length)
          Read from the echo.
 java.lang.String toString()
          Return a printable representation of this object.
 int write(byte[] buffer, int offset, int length)
          Write to the echo.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EchoJni

public EchoJni()
Constructs an instance of this class.

Method Detail

close

public void close()
           throws java.io.IOException

Close the echo. if an I/O error occurs.

Throws:
java.io.IOException

ensureOpen

protected void ensureOpen()
                   throws java.io.IOException
Ensure the echo is open. if an I/O error occurs.

Throws:
java.io.IOException

finalize

protected void finalize()
Close the port when no more references remain.

Overrides:
finalize in class java.lang.Object

getPortName

public java.lang.String getPortName()
Return the name of the echo.

Returns:
Results of the get port name (String) value.

isClosed

public boolean isClosed()
Return true if the echo is closed, false if open.

Returns:
Results of the is closed (boolean) value.

open

public void open(java.lang.String portName)
          throws java.io.IOException
Open the echo. if an I/O error occurs. The port name (String) parameter.

Parameters:
portName - The port name (String) parameter.
Throws:
java.io.IOException

read

public int read(byte[] buffer,
                int offset,
                int length)
         throws java.io.IOException
Read from the echo. if an I/O error occurs. The buffer (byte[]) parameter. The offset (int) parameter. The length (int) parameter.

Parameters:
buffer - The buffer (byte[]) parameter.
offset - The offset (int) parameter.
length - The length (int) parameter.
Returns:
Results of the read (int) value.
Throws:
java.io.IOException

toString

public java.lang.String toString()
Return a printable representation of this object.

Overrides:
toString in class java.lang.Object
Returns:
Results of the to string (String) value.

write

public int write(byte[] buffer,
                 int offset,
                 int length)
          throws java.io.IOException
Write to the echo. if an I/O error occurs. The buffer (byte[]) parameter. The offset (int) parameter. The length (int) parameter.

Parameters:
buffer - The buffer (byte[]) parameter.
offset - The offset (int) parameter.
length - The length (int) parameter.
Returns:
Results of the write (int) value.
Throws:
java.io.IOException

1.0.0

Copyright (c) 1999, 2007 IBM