DCT Lightfoot v3 API specification

com.dctl.j2me.io.socket
Class SocketInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--com.dctl.j2me.io.socket.SocketInputStream
All Implemented Interfaces:
Readable

public class SocketInputStream
extends InputStream

This reads data in from a socket


Method Summary
 int available()
          Return the number of available bytes in the buffer
 void close()
          Close the socket
 int read()
          Read one byte of data from the stream
 int read(byte[] buf, int off, int len)
          Read into a buffer from the stream
 long skip(long n)
          Skip a number of bytes
 
Methods inherited from class java.io.InputStream
mark, markSupported, read, reset
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

available

public int available()
              throws IOException
Return the number of available bytes in the buffer

Overrides:
available in class InputStream
Returns:
the number of bytes
Throws:
IOException - if there is an error

close

public void close()
           throws IOException
Close the socket

Overrides:
close in class InputStream
Throws:
IOException - if there is an error

read

public int read()
         throws IOException
Read one byte of data from the stream

Specified by:
read in interface Readable
Specified by:
read in class InputStream
Returns:
the byte or -1 if EOF
Throws:
IOException - if there is an error

read

public int read(byte[] buf,
                int off,
                int len)
         throws IOException
Read into a buffer from the stream

Specified by:
read in interface Readable
Overrides:
read in class InputStream
Parameters:
buf - The buffer
off - The offset into the buffer
len - The maximum length to read
Returns:
the number of bytes read or -1 if EOF
Throws:
IOException - if there is an error

skip

public long skip(long n)
          throws IOException
Skip a number of bytes

Specified by:
skip in interface Readable
Overrides:
skip in class InputStream
Parameters:
n - The number of bytes to skip
Returns:
the number of bytes skipped
Throws:
IOException - if there is an error

DCT Lightfoot v3 API specification

DCT Lightfoot v3 API specification