Interface PacketFactory<D extends PacketData<?>>
-
- All Known Implementing Classes:
SMB1PacketFactory,SMB2PacketFactory,SMB3CompressedPacketFactory,SMB3EncryptedPacketFactory
public interface PacketFactory<D extends PacketData<?>>
-
-
Method Summary
Modifier and Type Method Description booleancanHandle(byte[] data)Checks whether this PacketFactory is able to handle the incoming raw byte data.Dread(byte[] data)Constructpacket dataout of the raw byte data.
-
-
-
Method Detail
-
read
D read(byte[] data) throws Buffer.BufferException, java.io.IOException
Constructpacket dataout of the raw byte data.- Parameters:
data- the byte array containing the full packet data- Returns:
- A newly constructed
PacketDataobject. - Throws:
Buffer.BufferExceptionjava.io.IOException
-
canHandle
boolean canHandle(byte[] data)
Checks whether this PacketFactory is able to handle the incoming raw byte data.- Parameters:
data- the byte array containing the full packet data- Returns:
- true if the
read(byte[])will result in a packet, false otherwise.
-
-