Package com.hierynomus.mssmb2
Class SMB2PacketFactory
- java.lang.Object
-
- com.hierynomus.mssmb2.SMB2PacketFactory
-
- All Implemented Interfaces:
PacketFactory<SMB2PacketData>
public class SMB2PacketFactory extends java.lang.Object implements PacketFactory<SMB2PacketData>
-
-
Constructor Summary
Constructors Constructor Description SMB2PacketFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canHandle(byte[] data)
Checks whether this PacketFactory is able to handle the incoming raw byte data.SMB2PacketData
read(byte[] data)
Constructpacket data
out of the raw byte data.
-
-
-
Method Detail
-
read
public SMB2PacketData read(byte[] data) throws Buffer.BufferException
Description copied from interface:PacketFactory
Constructpacket data
out of the raw byte data.- Specified by:
read
in interfacePacketFactory<SMB2PacketData>
- Parameters:
data
- the byte array containing the full packet data- Returns:
- A newly constructed
PacketData
object. - Throws:
Buffer.BufferException
-
canHandle
public boolean canHandle(byte[] data)
Description copied from interface:PacketFactory
Checks whether this PacketFactory is able to handle the incoming raw byte data.- Specified by:
canHandle
in interfacePacketFactory<SMB2PacketData>
- Parameters:
data
- the byte array containing the full packet data- Returns:
- true if the
PacketFactory.read(byte[])
will result in a packet, false otherwise.
-
-