Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.1.0

E22843-01


com.tangosol.net
Class DatagramPacketOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by com.tangosol.net.DatagramPacketOutputStream

All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class DatagramPacketOutputStream
extends java.io.OutputStream

Provides an OutputStream on top of a DatagramPacket.

The flush() method must be invoked prior to sending the DatagramPacket.
The close() method must be invoked after sending the DatagramPacket; the OutputStream will remain open, but will have reset to the beginning of the packet buffer.

Author:
cp 2001.01.05

Constructor Summary
DatagramPacketOutputStream(java.net.DatagramPacket packet)
           

 

Method Summary
 void close()
          Closes this output stream and releases any system resources associated with this stream.
 void flush()
          Flushes this output stream and forces any buffered output bytes to be written out.
 void reset()
          Reset the output stream back to the beginning of the buffer.
 void write(byte[] abSrc, int ofSrc, int cbCopy)
          Writes len bytes from the specified byte array starting at offset off to this output stream.
 void write(int b)
          Writes the specified byte to this output stream.

 

Methods inherited from class java.io.OutputStream
write

 

Constructor Detail

DatagramPacketOutputStream

public DatagramPacketOutputStream(java.net.DatagramPacket packet)

Method Detail

write

public void write(int b)
           throws java.io.IOException
Writes the specified byte to this output stream.
Specified by:
write in class java.io.OutputStream
Throws:
java.io.IOException

write

public void write(byte[] abSrc,
                  int ofSrc,
                  int cbCopy)
           throws java.io.IOException
Writes len bytes from the specified byte array starting at offset off to this output stream.
Overrides:
write in class java.io.OutputStream
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
Flushes this output stream and forces any buffered output bytes to be written out.
Specified by:
flush in interface java.io.Flushable
Overrides:
flush in class java.io.OutputStream
Throws:
java.io.IOException

close

public void close()
Closes this output stream and releases any system resources associated with this stream.
Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.OutputStream

reset

public void reset()
Reset the output stream back to the beginning of the buffer.

Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.1.0

E22843-01


Copyright © 2000, 2011, Oracle and/or its affiliates. All rights reserved.