SunSPOT API V3.0


com.sun.spot.io.j2me.socket
Class SocketProtocolInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by com.sun.spot.io.j2me.socket.SocketProtocolInputStream

public class SocketProtocolInputStream
extends InputStream

Socket specific InputSteam. This class handles the passing of protocol information while remaining seamless to the user.

Author:
Martin Morissette

Field Summary
static int CONNECTION_CLOSE
           
static int END_OF_MSG
           
static int ESCAPE_CHAR
           
static int IOEXCEPTION
           
 
Constructor Summary
SocketProtocolInputStream(InputStream in)
          Create the input stream from another InputStream.
 
Method Summary
 void close()
          Close the InputStream.
 int read()
          Read data from the stream.
 
Methods inherited from class java.io.InputStream
available, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ESCAPE_CHAR

public static final int ESCAPE_CHAR
See Also:
Constant Field Values

CONNECTION_CLOSE

public static final int CONNECTION_CLOSE
See Also:
Constant Field Values

IOEXCEPTION

public static final int IOEXCEPTION
See Also:
Constant Field Values

END_OF_MSG

public static final int END_OF_MSG
See Also:
Constant Field Values
Constructor Detail

SocketProtocolInputStream

public SocketProtocolInputStream(InputStream in)
Create the input stream from another InputStream.

Parameters:
in - InputStream to be used
Method Detail

read

public int read()
         throws IOException
Read data from the stream.

Specified by:
read in class InputStream
Returns:
the next byte of data, or -1 if the end of the stream is reached.
Throws:
IOException - if an I/O error occurs.

close

public void close()
           throws IOException
Close the InputStream.

Overrides:
close in class InputStream
Throws:
IOException - if an I/O error occurs.

SunSPOT API V3.0


Copyright © 2006, 2007 Sun Microsystems, Inc. All Rights Reserved.