Package com.hierynomus.mssmb
Class SMB1PacketFactory
- java.lang.Object
-
- com.hierynomus.mssmb.SMB1PacketFactory
-
- All Implemented Interfaces:
PacketFactory<SMB1PacketData>
public class SMB1PacketFactory extends java.lang.Object implements PacketFactory<SMB1PacketData>
-
-
Constructor Summary
Constructors Constructor Description SMB1PacketFactory()
-
Method Summary
Modifier and Type Method Description booleancanHandle(byte[] data)Checks whether this PacketFactory is able to handle the incoming raw byte data.SMB1PacketDataread(byte[] data)Constructpacket dataout of the raw byte data.
-
-
-
Method Detail
-
read
public SMB1PacketData read(byte[] data) throws Buffer.BufferException, java.io.IOException
Description copied from interface:PacketFactoryConstructpacket dataout of the raw byte data.- Specified by:
readin interfacePacketFactory<SMB1PacketData>- Parameters:
data- the byte array containing the full packet data- Returns:
- A newly constructed
PacketDataobject. - Throws:
Buffer.BufferExceptionjava.io.IOException
-
canHandle
public boolean canHandle(byte[] data)
Description copied from interface:PacketFactoryChecks whether this PacketFactory is able to handle the incoming raw byte data.- Specified by:
canHandlein interfacePacketFactory<SMB1PacketData>- Parameters:
data- the byte array containing the full packet data- Returns:
- true if the
PacketFactory.read(byte[])will result in a packet, false otherwise.
-
-