SunSPOT host API V4.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
All Implemented Interfaces:
Closeable

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
 int available()
           
 void close()
          Close the InputStream.
 int read()
          Read data from the stream.
 
Methods inherited from class java.io.InputStream
mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, 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
Throws:
IOException

available

public int available()
              throws IOException
Overrides:
available in class InputStream
Throws:
IOException

close

public void close()
           throws IOException
Close the InputStream.

Specified by:
close in interface Closeable
Overrides:
close in class InputStream
Throws:
IOException

SunSPOT host API V4.0


Copyright 2006-2008 Sun Microsystems, Inc. All Rights Reserved.