public static TFTPPacket fromOPCode(short opcode){
        switch(opcode){
            case 1 : return new RRQPacket();
            case 2 : return new WRQPacket();
            case 3 : return new DataPacket();
            case 4 : return new AckPacket();
            case 5 : return new ErrorPacket();
        }

        return null;
    }