| 
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Object
  |
  +--OutputStream
        |
        +--FilterOutputStream
              |
              +--condor.cedar.CedarOutputStream
A Java output 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 | |
static int | 
DEFAULT_PACKET_SIZE
The default maximum size of a packet (8192 bytes)  | 
| Fields inherited from class FilterOutputStream | 
out | 
| Constructor Summary | |
CedarOutputStream(OutputStream out)
Creates a new CedarOutputStream wrapping an exising stream.  | 
|
CedarOutputStream(OutputStream out,
                  int packetSize)
Creates a new CedarOutputStream wrapping an exising stream with a given maximum packet size.  | 
|
| Method Summary | |
 void | 
close()
Flushs any buffered data, indicate end of message, and closes the underlying output stream.  | 
 void | 
endOfMessage()
Sends an end of message indication, as a separate empty packet, if necessary.  | 
 void | 
flush()
Sends the contents of the current output buffer as a packet.  | 
 void | 
write(byte[] b)
Writes some data to the output.  | 
 void | 
write(byte[] b,
      int off,
      int len)
Writes some data to the output.  | 
 void | 
write(int b)
Writes one byte to the output.  | 
 void | 
writeBoolean(boolean v)
Sends a boolean as a long integer (1 for true, 0 for false).  | 
 void | 
writeByte(int v)
Sends a byte as is.  | 
 void | 
writeBytes(String v)
Deprecated. Use writeUTF(java.lang.String) instead. | 
 void | 
writeChar(int v)
Sends a char as a long integer, zero-extended.  | 
 void | 
writeChars(String v)
Deprecated. Use writeUTF(java.lang.String) instead. | 
 void | 
writeDouble(double v)
Sends a double, big endian (MSB first).  | 
 void | 
writeFloat(float v)
Sends a float, big endian (MSB first).  | 
 void | 
writeInt(int v)
Sends an integer as a long integer, sign-extended.  | 
 void | 
writeLong(long v)
Sends a long integer, big endian (MSB first).  | 
 void | 
writeShort(int v)
Sends a short as a long integer, sign-extended.  | 
 void | 
writeUTF(String v)
Sends the string encoded using the Java version of UTF-8, followed by a null byte.  | 
| Methods inherited from class Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
public static final int DEFAULT_PACKET_SIZE
| Constructor Detail | 
public CedarOutputStream(OutputStream out)
out - the destination for raw bytes.
public CedarOutputStream(OutputStream out,
                         int packetSize)
out - the destination for raw bytes.packetSize - the maximum size of packet to send to stream "out".| Method Detail | 
public void write(int b)
           throws IOException
write in interface DataOutputwrite in class FilterOutputStreamb - the byte to write.
IOExecption - if there is an I/O error on the underlying stream.
IOException
public void write(byte[] b)
           throws IOException
write in interface DataOutputwrite in class FilterOutputStreamb - the data to write.
IOExecption - if there is an I/O error on the underlying stream.
IOException
public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
write in interface DataOutputwrite in class FilterOutputStreamb - the data to write.off - the starting location in the buffer.len - the number of bytes to write.
IOExecption - if there is an I/O error on the underlying stream.
IOException
public void flush()
           throws IOException
flush in class FilterOutputStreamIOExecption - if there is an I/O error on the underlying stream.
IOException
public void close()
           throws IOException
close in class FilterOutputStreamIOExecption - if there is an I/O error on the underlying stream.
IOException
public void endOfMessage()
                  throws IOException
IOExecption - if there is an I/O error on the underlying stream.
IOException
public void writeBoolean(boolean v)
                  throws IOException
writeBoolean in interface DataOutputv - the data to send.
IOExecption - if there is an I/O error on the underlying stream.
IOException
public void writeByte(int v)
               throws IOException
writeByte in interface DataOutputv - the data to send.
IOExecption - if there is an I/O error on the underlying stream.
IOException
public void writeShort(int v)
                throws IOException
writeShort in interface DataOutputv - the data to send.
IOExecption - if there is an I/O error on the underlying stream.
IOException
public void writeChar(int v)
               throws IOException
writeChar in interface DataOutputv - the data to send.
IOExecption - if there is an I/O error on the underlying stream.
IOException
public void writeInt(int v)
              throws IOException
writeInt in interface DataOutputv - the data to send.
IOExecption - if there is an I/O error on the underlying stream.
IOException
public void writeLong(long v)
               throws IOException
writeLong in interface DataOutputv - the data to send.
IOExecption - if there is an I/O error on the underlying stream.
IOException
public void writeFloat(float v)
                throws IOException
writeFloat in interface DataOutputv - the data to send.
IOExecption - if there is an I/O error on the underlying stream.
IOException
public void writeDouble(double v)
                 throws IOException
writeDouble in interface DataOutputv - the data to send.
IOExecption - if there is an I/O error on the underlying stream.
IOException
public void writeBytes(String v)
                throws IOException
writeUTF(java.lang.String) instead.
writeBytes in interface DataOutputv - the data to send.
IOExecption - if there is an I/O error on the underlying stream.
IOException
public void writeChars(String v)
                throws IOException
writeUTF(java.lang.String) instead.
writeChars in interface DataOutputv - the data to send.
IOExecption - if there is an I/O error on the underlying stream.
IOException
public void writeUTF(String v)
              throws IOException
writeUTF in interface DataOutputv - the data to send.
IOExecption - if there is an I/O error on the underlying stream.
IOException
  | 
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||