|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.hebe.mps.InputStream
Structures the bitstream coming from an MPS server into usable MPS primitive types (mapped onto Java types, of course). Uses a Connection object to talk to the other end.
Connection
,
OutputStream
Field Summary | |
private Connection |
connection
|
private java.io.InputStream |
input
|
Constructor Summary | |
InputStream(Connection c)
Construct an InputStream which decodes the bits coming from a Connection object. |
|
InputStream(java.io.InputStream i)
Construct an InputStream which decodes bits from an arbitrary inputstream. |
Method Summary | |
private void |
open()
Causes the connection to the server to open, if it isn't already open. |
private int |
read()
Reads a single byte from the server. |
boolean |
readbool()
Reads a single boolean from the server. |
char |
readchar()
Reads a single char from the server. |
float |
readfloat()
Reads a single float from the server. |
int |
readint()
Reads a single int from the server. |
long |
readlong()
Reads a single 64-bit long from the server. |
java.lang.String |
readReference()
Reads the canonical (bound) name of an MPS object from the remote end of the link. |
java.lang.String |
readstring()
Reads a single java.lang.String from the server. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private Connection connection
private java.io.InputStream input
Constructor Detail |
public InputStream(Connection c)
c
- the raw connection to filterpublic InputStream(java.io.InputStream i)
i
- the raw inputstream to filterMethod Detail |
private int read() throws java.io.IOException, MPSException
java.io.IOException
- if there's an error reading our inputMPSConnectionClosedException
- if the connection closes unexpectedlyprivate void open() throws MPSException
MPSException
- from connection.getInputStream() if there's a problemConnection.getInputStream()
public int readint() throws MPSException
MPSException
- if there's a problem readingpublic java.lang.String readstring() throws MPSException
MPSException
- if there's a problem readingString
public boolean readbool() throws MPSException
MPSException
- if there's a problem readingpublic long readlong() throws MPSException
MPSException
- if there's a problem readingpublic char readchar() throws MPSException
MPSException
- if there's a problem readingpublic java.lang.String readReference() throws MPSException
MPSException
- if there's a problem readingOutputStream.writeReference(java.lang.Object)
public float readfloat() throws MPSException
MPSException
- if there's a problem reading
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |