com.sun.spot.io.j2me.socket
Class SocketProtocolInputStream
java.lang.Object
java.io.InputStream
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
|
Method Summary |
void |
close()
Close the InputStream. |
int |
read()
Read data from the stream. |
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
SocketProtocolInputStream
public SocketProtocolInputStream(InputStream in)
- Create the input stream from another InputStream.
- Parameters:
in - InputStream to be used
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.
Copyright © 2006 Sun Microsystems, Inc. All Rights Reserved.