All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.pkts.packet.impl.UnknownApplicationPacketImpl Maven / Gradle / Ivy

There is a newer version: 3.0.10
Show newest version
/**
 * 
 */
package io.pkts.packet.impl;

import io.pkts.buffer.Buffer;
import io.pkts.packet.Packet;
import io.pkts.packet.TransportPacket;
import io.pkts.protocol.Protocol;

import java.io.IOException;

/**
 * 
 * @author [email protected]
 */
public class UnknownApplicationPacketImpl extends AbstractApplicationPacket {

    /**
     * @param p
     * @param parent
     * @param payload
     */
    public UnknownApplicationPacketImpl(final TransportPacket parent, final Buffer payload) {
        super(Protocol.UNKNOWN, parent, payload);
    }

    @Override
    public Packet getNextPacket() throws IOException {
        // We can't even figure out what this packet is so there is no
        // way we would be able to figure out if this unkown packet
        // has a body of some sort and what potentially that payload would
        // be... hence, returning null
        return null;
    }

    @Override
    public UnknownApplicationPacketImpl clone() {
        return new UnknownApplicationPacketImpl(getParent(), getPayload());
    }

    @Override
    public boolean isUDP() {
        return getParent().isUDP();
    }

    @Override
    public boolean isTCP() {
        return getParent().isTCP();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy