com.buglabs.bug.jni.common
Class CharDeviceInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by com.buglabs.bug.jni.common.CharDeviceInputStream
All Implemented Interfaces:
java.io.Closeable

public class CharDeviceInputStream
extends java.io.InputStream

Treat a CharDeice as an input stream.


Constructor Summary
CharDeviceInputStream(CharDevice cdev)
           
 
Method Summary
 void close()
           
 boolean equals(java.lang.Object obj)
           
 int getFileDescriptor()
           
 java.lang.String getline()
           
 int hashCode()
           
 int ioctl(int request)
           
 long lseek(long offset, int whence)
           
 int open(java.lang.String file, int mode)
           
 int read()
           
 int read(byte[] buff)
           
 java.lang.String toString()
           
 long write(byte[] buf, long count)
           
 
Methods inherited from class java.io.InputStream
available, mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CharDeviceInputStream

public CharDeviceInputStream(CharDevice cdev)
Method Detail

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

getFileDescriptor

public int getFileDescriptor()

getline

public java.lang.String getline()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

ioctl

public int ioctl(int request)

lseek

public long lseek(long offset,
                  int whence)

open

public int open(java.lang.String file,
                int mode)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

write

public long write(byte[] buf,
                  long count)

read

public int read()
         throws java.io.IOException
Specified by:
read in class java.io.InputStream
Throws:
java.io.IOException

read

public int read(byte[] buff)
         throws java.io.IOException
Overrides:
read in class java.io.InputStream
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.InputStream
Throws:
java.io.IOException