All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class AcmeNet.Util.PacketInputStream

AcmeNet.Util.PacketInputStream

public class PacketInputStream
An input stream containing a packet that arrived via AcmeNet. You can use the ordinary DataInputStream methods to read data out of the packet. When you read "end of stream", that means you've exhausted all the data in the packet.

See Also:
ArrivingPacketQueue

Variable Index

 o sender
The address from which the packet was sent.

Constructor Index

 o PacketInputStream(ArrivingPacket)
Build a PacketIntputStream from an ArrivingPacket.
 o PacketInputStream(InputStream, NetAddress)

Method Index

 o getSender()

Variables

 o sender
 protected NetAddress sender
The address from which the packet was sent.

Constructors

 o PacketInputStream
 public PacketInputStream(ArrivingPacket pkt)
Build a PacketIntputStream from an ArrivingPacket.

Parameters:
pkt - the packet to use
 o PacketInputStream
 public PacketInputStream(InputStream str,
                          NetAddress s)
Parameters:
str - a stream containing the packet data
s - the address from which the packet was sent

Methods

 o getSender
 public NetAddress getSender()
Returns:
s the address from which the packet was sent

All Packages  Class Hierarchy  This Package  Previous  Next  Index