| 
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
ObjectInputStream
FilterInputStream
condor.cedar.CedarInputStream
A Java input stream that more-or-less corresponds to the C++ class ReliSock. Except for floats, this class attempts to be compatible with the existing Condor conventions for sending data over a connection. See The package description for details.
| Field Summary | 
| Fields inherited from class FilterInputStream | 
in | 
| Constructor Summary | |
CedarInputStream(InputStream in)
Creates a new CedarInputStream wrapping an exising stream.  | 
|
| Method Summary | |
 int | 
available()
Returns the number of bytes buffered.  | 
 void | 
close()
Closes the underlying stream and discards all buffered data.  | 
 int | 
getByteCount()
Returns the number of "raw" bytes consumed from the original input stream, including Cedar overhead, since this stream was opened.  | 
 void | 
mark(int n)
Does nothing (mark not supported).  | 
 boolean | 
markSupported()
Always returns false (mark not supported).  | 
 boolean | 
nextMessage()
Advances the input stream to the start of the next message.  | 
 int | 
read()
Reads one byte from the input stream.  | 
 int | 
read(byte[] b)
Reads at most b.length bytes from the input stream.  | 
 int | 
read(byte[] b,
     int off,
     int len)
Reads at most len bytes from the input stream into buffer b, starting at offset off.  | 
 boolean | 
readBoolean()
Reads one boolean from the input stream.  | 
 byte | 
readByte()
Reads a byte from the input stream.  | 
 char | 
readChar()
Reads one character from the input stream.  | 
 double | 
readDouble()
Reads a double from the input stream.  | 
 float | 
readFloat()
Reads a float from the input stream.  | 
 void | 
readFully(byte[] b)
Equivalent to readFully(b, 0, b.length).  | 
 void | 
readFully(byte[] b,
          int off,
          int len)
Reads a specified number of bytes, or throws an exception if there are not that many more bytes before the next end-of-message indication.  | 
 int | 
readInt()
Reads an integer from the input stream.  | 
 String | 
readLine()
Deprecated. Use readUTF() instead. | 
 long | 
readLong()
Reads a long (64-bit) integer from the input stream.  | 
 short | 
readShort()
Reads a short from the input stream.  | 
 int | 
readUnsignedByte()
Reads an unsigned byte from the input stream.  | 
 int | 
readUnsignedShort()
Reads an unsigned short from the input stream.  | 
 String | 
readUTF()
Reads a null-terminated string in modified UTF-8 encoding from the input and throw away the terminating null.  | 
 int | 
readUTFchar()
Reads one character in UTF format from the input.  | 
 void | 
reset()
Always throws IOException (mark not supported).  | 
 long | 
skip(long n)
Skips up n bytes or to the end of the current message, whichever comes first.  | 
 int | 
skipBytes(int n)
Equivalent to (int) skip(n).  | 
| Methods inherited from class Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
public CedarInputStream(InputStream in)
in - the source of raw bytes.| Method Detail | 
public boolean nextMessage()
                    throws IOException
IOException - if there is an I/O error on the underlying stream.
public int read()
         throws IOException
IOException - if there is an I/O error on the underlying stream.
public int read(byte[] b)
         throws IOException
b - the place to put the data.
IOException - if there is an I/O error on the underlying stream.
public int read(byte[] b,
                int off,
                int len)
         throws IOException
b - the place to put the data.off - starting offset in b.len - maximum number of bytes to read.
IOException - if there is an I/O error on the underlying stream.
public long skip(long n)
          throws IOException
n - the maximum number of bytes to skip.
IOException - if there is an I/O error on the underlying stream.
public int available()
              throws IOException
IOException - if there is an I/O error on the underlying stream.
public void close()
           throws IOException
IOException - if there is an I/O error on the underlying stream.public void mark(int n)
public void reset()
           throws IOException
IOException - always.public boolean markSupported()
public void readFully(byte[] b)
               throws IOException
readFully in interface DataInputb - a place to put the data.
IOException - if there is an I/O error on the underlying stream.
public void readFully(byte[] b,
                      int off,
                      int len)
               throws IOException
readFully in interface DataInputb - place to put the data.off - offset within b where the data starts.len - number of bytes to read.
EOFException - if end-of-message is encountered before the
 specified number of bytes are read.
IOException - if there is an I/O error on the underlying stream.
public int skipBytes(int n)
              throws IOException
skipBytes in interface DataInputn - the maximum number of bytes to skip.
IOException - if there is an I/O error on the underlying stream.
public boolean readBoolean()
                    throws IOException
readBoolean in interface DataInputIOException - if there is an I/O error on the underlying stream.
public byte readByte()
              throws IOException
readByte in interface DataInputIOException - if there is an I/O error on the underlying stream.
public int readUnsignedByte()
                     throws IOException
readUnsignedByte in interface DataInputIOException - if there is an I/O error on the underlying stream.
public short readShort()
                throws IOException
readShort in interface DataInputIOException - if there is an I/O error on the underlying stream.
public int readUnsignedShort()
                      throws IOException
readUnsignedShort in interface DataInputIOException - if there is an I/O error on the underlying stream.
public char readChar()
              throws IOException
readChar in interface DataInputIOException - if there is an I/O error on the underlying stream.
public int readInt()
            throws IOException
readInt in interface DataInputIOException - if there is an I/O error on the underlying stream.
public long readLong()
              throws IOException
readLong in interface DataInputIOException - if there is an I/O error on the underlying stream.
public float readFloat()
                throws IOException
readFloat in interface DataInputIOException - if there is an I/O error on the underlying stream.
public double readDouble()
                  throws IOException
readDouble in interface DataInputIOException - if there is an I/O error on the underlying stream.
public String readLine()
                throws IOException
readUTF() instead.
readLine in interface DataInputIOException - if there is an I/O error on the underlying stream.
public String readUTF()
               throws IOException
readUTF in interface DataInputUTFDataFormatException - if the input data contains a bad
 escape sequece.
EOFException - if end-of-message is encountered before a null.
IOException - if there is an I/O error on the underlying stream.
public final int readUTFchar()
                      throws IOException
UTFDataFormatException - if the input data contains a bad
 escape sequece.
EOFException - if end-of-message is encountered.
IOException - if there is an I/O error on the underlying stream.public int getByteCount()
  | 
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||