Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.jini.discovery
Interface DatagramBufferFactory

public interface DatagramBufferFactory

Factory that produces byte buffers, each corresponding to a separate datagram packet to be sent. `DatagramBufferFactory` instances are passed to the encoding methods of `MulticastRequestEncoder` and `MulticastAnnouncementEncoder`, which can encode data to multiple datagram packets (if needed) by writing to multiple buffers obtained from the factory.

Since:
  2.0

Method Summary
`ByteBuffer` | `newBuffer()` Returns a byte buffer into which to write encoded multicast packet data.

Method Detail

### newBuffer

    public ByteBuffer newBuffer()

  Returns a byte buffer into which to write encoded multicast packet data. The buffer encompasses all of the data for the packet to be sent: buffer offset `0` corresponds to the start of packet data, and the capacity of the buffer indicates the maximum packet size. Encoding methods should start writing data at the initial (non-zero) position of the buffer; the final position of the buffer after the encoding method has returned is used to mark the end of encoded data, which translates into the actual length of the sent packet.

  Returns:
    a buffer into which to write encoded multicast packet data

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 Sun Microsystems, Inc. All rights reserved