FileDocCategorySizeDatePackage
IrNativeConnection.javaAPI DocphoneME MR2 API (J2ME)9240Wed May 02 18:00:30 BST 2007com.sun.midp.io.j2me.irdaobex

IrNativeInputStream

public class IrNativeInputStream extends InputStream
Provides the input stream implementation for the IrNativeConnection class. It simply forwards read() requests to its holder instance.

Fields Summary
private IrNativeConnection
conn
IrNativeConnection instance which maintains this stream.
Constructors Summary
public IrNativeInputStream(IrNativeConnection conn)
Class constructor.

param
conn holder of this instance.

	this.conn = conn;
    
Methods Summary
public intread()
Defines an abstract method of the interface. This method is not supposed to be used.

return
this method does not return any value
throws
RuntimeException on invocation

	throw new RuntimeException("read() method is not supported.");
    
public intread(byte[] b, int off, int len)
Reads a number of bytes to the specified byte array starting from the given offset. This method simply forwards the request to the owner IrNativeConnection instance.

param
b destination byte array
param
off offset in the array
param
len number of bytes to read
return
number of bytes actually read
throws
IOException if an I/O error occurs

	return conn.read(b, off, len);