| java.lang.Object java.io.OutputStream gov.nist.microedition.sip.SDPOutputStream
Method Summary | |
public void | close() | public void | flush() Flushes this output stream and forces any buffered output bytes
to be written out. | protected ByteArrayOutputStream | getByteArrayOutputStream() Return the ByteArrayOutputStream object wrapped by this class. | public boolean | isOpen() Return the status of the output stream (open or closed). | protected void | setOpen(boolean newOpenState) The send() functions use this function to toggle the stream state. | public String | toString() Convert to a string containing debugging information. | public void | write(int b) Writes the specified byte to the wrapped byte array output stream. | public void | write(byte[] b) Writes b.length bytes from the specified byte array to the
wrapped output stream. | public void | write(byte[] b, int off, int len) Writes len bytes from the specified byte array
starting at offset off to the wrapped byte
array output stream. |
SDPOutputStream | public SDPOutputStream(SipConnection connection)(Code) | | Constructs a stream for the requested connection.
Parameters: connection - the associated connection |
close | public void close() throws IOException(Code) | | Close the SDPOutputStream and send the message held by the
sip connection
|
flush | public void flush() throws IOException(Code) | | Flushes this output stream and forces any buffered output bytes
to be written out. The general contract of flush is
that calling it is an indication that, if any bytes previously
written have been buffered by the implementation of the output
stream, such bytes should immediately be written to their
intended destination.
The flush method of OutputStream does nothing.
exception: IOException - if the stream is closed. |
getByteArrayOutputStream | protected ByteArrayOutputStream getByteArrayOutputStream()(Code) | | Return the ByteArrayOutputStream object wrapped by this class.
The problem is that ByteArrayOutputStream methods do not throw
IOException, while SDPOutputStream methods should.
the ByteArrayOutputStream object |
isOpen | public boolean isOpen()(Code) | | Return the status of the output stream (open or closed).
When the stream is closed, write() throws an IOException.
The open or closed status does not affect the internal
ByteArrayOutputStream object.
true if the stream is open |
setOpen | protected void setOpen(boolean newOpenState)(Code) | | The send() functions use this function to toggle the stream state.
(send() cannot call close() because it's done vice versa:
close() calls send())
Parameters: newOpenState - the new state |
toString | public String toString()(Code) | | Convert to a string containing debugging information.
string containing: class name + hash value + isOpen state |
write | public void write(int b) throws IOException(Code) | | Writes the specified byte to the wrapped byte array output stream.
Parameters: b - the byte to be written. exception: IOException - if the stream is closed. |
write | public void write(byte[] b) throws IOException(Code) | | Writes b.length bytes from the specified byte array to the
wrapped output stream. The general contract for write(b)
is that it should have exactly the same effect as the call
write(b, 0, b.length) .
Parameters: b - the data. exception: IOException - if an I/O error occurs. See Also: java.io.OutputStream.write(byte[]intint) exception: IOException - if the stream is closed. |
write | public void write(byte[] b, int off, int len) throws IOException(Code) | | Writes len bytes from the specified byte array
starting at offset off to the wrapped byte
array output stream.
Parameters: b - the data. Parameters: off - the start offset in the data. Parameters: len - the number of bytes to write. exception: IOException - if the stream is closed. |
|
|