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

## org.codehaus.activemq.message
Interface PacketReader

All Known Implementing Classes:
  AbstractPacketReader

public interface PacketReader

Allows instances implementing Packet to read from a DataOutputStream

Method Summary
`void` | `buildPacket(Packet packet, DataInput dataIn)` build a Packet instance from the data input stream
`boolean` | `canRead(int packetType)`
`Packet` | `createPacket()`
`int` | `getPacketType()` Return the type of Packet
`Packet` | `readPacketFromByteArray(byte[] data)` Deserailizes a Packet from a byte array

Method Detail

### getPacketType

    public int getPacketType()

  Return the type of Packet

  Returns:
    integer representation of the type of Packet

### canRead

    public boolean canRead(int packetType)

  Parameters:
    `packetType` -
  Returns:
    true if this PacketReader can a Packet of this type

### createPacket

    public Packet createPacket()

  Returns:
    a new Packet instance

### buildPacket

    public void buildPacket(Packet packet,
                            DataInput dataIn)
                     throws IOException

  build a Packet instance from the data input stream

  Parameters:
    `packet` - A Packet object
    `dataIn` - the data input stream to build the packet from
  Throws:
    `IOException`

### readPacketFromByteArray

    public Packet readPacketFromByteArray(byte[] data)
                                   throws IOException

  Deserailizes a Packet from a byte array

  Parameters:
    `data` -
  Returns:
    the deserialized Packet
  Throws:
    `IOException`

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 Protique, Ltd.. All Rights Reserved.