2008-07-29 1.1.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.1.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)
           
 int read(byte[] buffer, int offset, int length)
           
 java.lang.String toString()
          Return a printable representation of this object.
 int write(byte[] buffer, int offset, int length)
           
 
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 - IOException.

ensureOpen

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

Throws:
java.io.IOException - 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
Parameters:
portName - The port name (String) parameter.
Throws:
java.io.IOException - IOException.

read

public int read(byte[] buffer,
                int offset,
                int length)
         throws java.io.IOException
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 - 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
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 - IOException.

2008-07-29 1.1.0

Copyright (c) 1999, 2008 IBM and others. See license in Legal section. OSGi Framework Version 3.4.0.v20080605-1900